Gmail: Compose Mail Functionality - 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: Gmail: Compose Mail Functionality (/Thread-Gmail-Compose-Mail-Functionality) |
Gmail: Compose Mail Functionality - kishore.gkk - 08-09-2010 I never thought I have to struggle 12 hrs to automate ‘compose mail’ functionality in gmail. But still I am unable to execute it successfully. I have been struggling to identify the objects of ‘compose mail link”, “To text box”, “subject text box”, “send button”. I can understand it is a simple issue but in real I am struggling, The code i am using. '***************************************************** Code: If Browser("title:=Gmail.*").Page("title:=Gmail.*").WebElement("innertext:=Compose Mail", "html id:=:rd", "html tag:=B").Exist Then '*************************************************** In some runs, some of the objects are being identified by QTP and in the next run same objects are not being identified. I thought i would use Object repositary to store the objects and get them identified. But the above mentioned objects are lying under frames whose name starts with 'c'. So i cant use c.* for all the frames. Note: Before you suggest any code, please run it once on gmail and if it is passing then only put down here. Otherwise i end up loosing more time in implementing your code. In some posts i read use the below to click on compose mail Code: Browser("title:=Gmail.*").WebElement("html id:=:rd").Click but i didn't work Thanks, kishore RE: Gmail: Compose Mail Functionality - kishore.gkk - 08-10-2010 Here is the code which is working. Thanks to Anshoo arora the moderator. Code: With Browser("title:=Gmail.*").Page("title:=Gmail.*") RE: Gmail: Compose Mail Functionality - adityapant27 - 12-25-2012 But why we use Exist(10)... I dont understand it.. please let me know/ Thanks Adi RE: Gmail: Compose Mail Functionality - elango87 - 12-25-2012 Exist is used to check if the object is present in the screen and do the operations on the object. for example, , Code: Browser("").Page("").Image("").Exist(5) If we use the code above QTP will wait a maximum of 5 seconds for the Image("") object to appear. If it appears, it will execute the next line of code. If the object doesn't appear with in 5 seconds, the step will fail. Hope you got it. Thanks, Elango RE: Gmail: Compose Mail Functionality - newqtp - 02-15-2013 I am trying to delete email from gmail account and I am stuck. I have tried different combination but no luck. Code: If Browser("name:=Your CarMax validation code.*").page("Title:=Your CarMax validation code.*").webtable("class:=Bs nH iY").Exist Then 'giving error as too many web element. Code: 'Browser("name:=Your CarMax validation code.*").page("Title:=Your CarMax validation code.*").webtable("class:=Bs nH iY").webelement("class:=cj", "outtertext:= Delete this message").Click Finally I got it work by below line of text 1) read the email you want to delete by getrowtextcell("Gmail") 2) Now click the trash can on top bar. Code: Browser("name:=.*").page("Title:=.*").webelement("class:=T-I J-J5-Ji nX T-I-ax7 T-I-Js-Gs ar7").Submit But I would like to delete by fly out "delete this message" option as above code delete all the mails which are grouped by that text. RE: Gmail: Compose Mail Functionality - newqtp - 02-15-2013 Now working code doesn't work, I am back to square 1.. Need help |