We will write a script to login to a Gmail Account. This QTP Script to log into Gmail Account is a Generic one. There is no need for us to have Object Repository since I am using Descriptive Programming. Where we use the properties and the values to identify the run time object in the Application under test.
We will write a descriptive program to login to Gmail Account. What I am doing is that each of the script contains a line of code to launch Gmail Application and then log into the application
To launch the Gmail application we need to use QTP reserved object like Systemutil or can interact with the Internet Explorer library and launch gmail. After launching the Gmail Application we have the script to login to the account by passing username and password. We will be printing the result at each step to see how the application is behaving
Systemutil.Run "http://www.gmail.com"
Or
22 comments:
the script is written in which language??
and what i have to do in order to use this....
Thanks and Regards
It is VBS language,save it as "anything.vbs" Ithink...
hh
how can we write the above gmail login script using Data driven?
gmail login script using data driven
Set xl= createobject("Excel.Application")
Set wb = xl.Workbooks.Open ("D:\gmaillogin")
Set os = xl.Sheets("Sheet1")
nrc = os.usedrange.rows.count
For i = 1 to nrc
uname = os.cells(i,1)
pwd = os.cells(i,2)
systemutil.Run "iexplore","http://gmail.com"
Browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Email").set(uname)
Browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Passwd").set(pwd)
Browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webbutton("name:=Sign in").Click
wait(2)
If Browser("CreationTime:=0").Exist then
browser("creationtime:=0").Close
end if
Next
Thanks for the one who created it, a layman who doesn't know about QTP also can understand what is QTP.
How can I do this using perl?
Gr8 job
Thanx 4 the script...
Please give some more helpful examples like the above one
excellent work, easy to understand
Using descriptive Prog. how can I write login script for all combination of valid and invalid username,password and how can i generate a report for the passed and failed test. Can you shoa an example for that.
Great job
even when you use SSL. Mike Perry's Bugtraq posting from over half a year ago explains it well. gmail.com sign in
I have a great fun reading your blogs.Thank you for making this beautiful and awesome blogs. Hope to read more post from you in the future. Please dont forget to visit me in my site @ www.imarksweb.org. Thank you.
write script to login excelent pposts..
informatica online training in hyderabad
Hi,
Well explained about Write a Script to Login in to Gmail Account using QTP. Can you explain about What are the types object Repositories in QTP?
Thanks,
David,
QTP Developer
When you're 90 years old, what will matter most to you?ThingsyoudoforbeautyDo you serve money or does money serve you?INDIA'S BEST OFF SITE SEO PROVIDER CHEAPEST AND FASTEST OFF SITE SEO SERVICE IN INDIA infocompanion educatijhn
Coach require authority a. Attack mission through race west guess.religious
Post a Comment