Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gmail: Compose Mail Functionality
#1
Not Solved
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
    Browser("title:=Gmail.*").Page("title:=Gmail.*").WebElement("innertext:=Compose Mail", "html id:=:rd", "html tag:=B").Click -9999, -9999
    Browser("title:=Gmail.*").Page("title:=Gmail.*").Sync
    If Browser("title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=to", "class:=dK nr l1", "rows:=2").Exist Then
        Browser("title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=to", "class:=dK nr l1", "rows:=2").Set "<xyz@gmail.com> "
        If  Browser("title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=subject").Exist Then
            Browser("title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=subject").Set "hi"
            If  Browser("title:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Send").Exist Then
                Browser("title:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Send").Click -9999, -9999
                Browser("title:=Gmail.*").Page("title:=Gmail.*").Sync
            Else
                   MsgBox( "Send button Not found")
                
            End If
        Else
            MsgBox( " Subject text box Not found")
            
        End If
    Else
        MsgBox( "To text box not found")
            End if
Else
    MsgBox( "Compose Mail link not found")
    
End If

'***************************************************
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
Reply


Messages In This Thread
Gmail: Compose Mail Functionality - by kishore.gkk - 08-09-2010, 04:02 PM
RE: Gmail: Compose Mail Functionality - by newqtp - 02-15-2013, 12:59 AM
RE: Gmail: Compose Mail Functionality - by newqtp - 02-15-2013, 08:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  To send Fail Results to mail Naresh 1 2,560 04-23-2015, 08:30 PM
Last Post: babu123
  To send the QTP Results to mail using Thunderbird Naresh 0 2,425 04-03-2015, 03:19 PM
Last Post: Naresh
  How to delete particular mails in Gmail using QTP rajkumarsm 1 4,200 10-06-2014, 07:03 PM
Last Post: rajkumarsm
  Delete Gmail email newqtp 4 4,769 07-05-2013, 02:12 PM
Last Post: Staff
  Total no of mail in gmail excellentpawan 2 3,206 07-05-2013, 01:56 PM
Last Post: Staff

Forum Jump:


Users browsing this thread: 1 Guest(s)