HI Aparna,
The below script is with respect to Gmail.
The pre requite are that you need to be logged into Gmail Account.
The below script is written using Descriptive Programming.
So no need of worrying about object repository. Since the Description Text
box is a multi line text box and is identified as a WebElement and since it
is an editor wededit wont work and we use the Innertext method to set the
required text in to the Mail Body text Editor.
Browser("title:=Gmail.*").page("title:=Gmail.*").WebElement("class:=p.*",
"innertext:=Compose Mail", "html id:=:r.*").Click
Browser("title:=Gmail.*").page("title:=Gmail.*").WebEdit("class
name:=WebEdit", "name:=to").Set "[email protected]"
Browser("title:=Gmail.*").page("title:=Gmail.*").WebEdit("class
name:=WebEdit", "name:=subject").Set "Test Mail"
Set desc =
Browser("title:=Gmail.*").Page("title:=Gmail.*").WebElement("class:=editable
LW-yrriRe", "html tag:=body")
desc.object.innertext = "this is a test email"
wait 2
Browser("title:=Gmail.*").page("title:=Gmail.*").WebElement("innertext:=Send",
"index:=*.*").Click
If the mail is not sent upon executing the last line of the code then add
these two lines
Set wsh = CreateObject("wscript.shell")
wsh.sendkeys ("{Enter}")
Hope this code works for you and any query can get in touch with me or
members please make corrections to it.
Regards, Kiran Paul
http://www.qtp4free.blogspot.com
<http://qtp4free.blogspot.com>
--- @ WiseStamp
Signature<http://my.wisestamp.com/link?u=9m92zjczzzgs4dcx&site=www.wisestamp.com/email-install>.
Get it
now<http://my.wisestamp.com/link?u=9m92zjczzzgs4dcx&site=www.wisestamp.com/email-install>
On Sat, Jul 31, 2010 at 9:20 AM, aparnadharthi reddy <
[email protected]> wrote:
> Hi friends
>
> How to identify object property of Compose mail. I want to write a
> script Send a mails in QTP using Descriptive programming can you help
> how to write a script or send a mail to [email protected]
>
> Regards
> Aparna
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en