Micro Focus QTP (UFT) Forums
Unable to detect send button on compose mail page of gmail - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Unable to detect send button on compose mail page of gmail (/Thread-Unable-to-detect-send-button-on-compose-mail-page-of-gmail)



Unable to detect send button on compose mail page of gmail - nehajain - 05-16-2012

On Compose mail page of gmail, there are 2 Send buttons and when i running
the following code :

Code:
Browser("Gmail: Email from Google").Page("title:=Gmail - Compose Mail").WebButton("name:=Send", "html tag:= INPUT", "type:= submit").Click

It is showing error for identification as 2 send buttons with same properties are present.

Can anybody provide solution to this problem?


RE: Unable to detect send button on compose mail page of gmail - falvi - 05-16-2012

try adding the index...

Code:
WebButton("name:=Send" , "html tag:=INPUT" , "type:=Submit" , "index:=0")



RE: Unable to detect send button on compose mail page of gmail - nehajain - 05-16-2012

I tried this also
but its showing object doesn't support this property..


RE: Unable to detect send button on compose mail page of gmail - falvi - 05-16-2012

i usually don't bother with the "browser" and "page" and always add them to repository... and after that this is the code i tried, and it's working for me... and i'm assuming you're using Basic HTML view of Gmail.
Code:
Dim SendBtn
Set SendBtn = Description.Create()

SendBtn("name").value = "Send"
SendBtn("micclass").value = "WebButton"
SendBtn("type").value = "submit"
SendBtn("index").value = "0"

Browser("Gmail - Compose Mail").Page("Gmail - Compose Mail").WebButton(SendBtn).Click



RE: Unable to detect send button on compose mail page of gmail - nehajain - 05-16-2012

Thanks...
after using descriptive programming...its working


RE: Unable to detect send button on compose mail page of gmail - falvi - 05-16-2012

and this also worked for me.
Code:
Browser("Gmail - Compose Mail").Page("Gmail - Compose Mail").WebButton("name:=Send" , "type:=submit" , "index:=0").Click

please note that QTP must be launched before the browser, otherwise issues arise in object identification,
which OS, Browser and QTP version are you using?



glad to be of help Smile