write script to open Gmail.com, and to write script for
entering username and password and show whether the result
as pass or fail
Answer Posted / srinivasareddy
'---------------------------------------------opening gmail
login page------------------------------------------------
systemutil.Run "iexplore.exe","www.gmail.com",,,3
wait(20)
If Browser("name:=Gmail: Email from
Google").Page("title:=Gmail: Email from
Google").WebEdit("name:=Email","html id:=Email").exist Then
Reporter.ReportEvent micPass,"Login page","Gmail Login
Page Succesfully Opened"
Browser("name:=Gmail: Email from
Google").Page("title:=Gmail: Email from
Google").WebEdit("name:=Email","html id:=Email").set
"balagisrinu.reddy"
Browser("name:=Gmail: Email from
Google").Page("title:=Gmail: Email from
Google").WebEdit("name:=Passwd","html id:=Passwd").set
"00000000"
Browser("name:=Gmail: Email from
Google").Page("title:=Gmail: Email from
Google").WebButton("name:=Sign in","html id:=signIn").Submit
else
Reporter.ReportEvent micFail,"Login page","Gmail Login Page
Not Opened Succesfully "
ExitTestIteration
End If
'--------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------validating
the my mail id opened--------------------------------------
'Browser("name:=Gmail - Inbox").Page("title:=Gmail -
Inbox").Link("text:=Compose Mail","name:=Compose
Mail").highlight
wait(20)
If Browser("name:=Gmail - Inbox").Page("title:=Gmail -
Inbox").Link("text:=Compose Mail","name:=Compose
Mail").exist Then
Reporter.ReportEvent micPass,"Sign in","login is successfully"
else
Reporter.ReportEvent micPass,"Sign in","login is Not
successfull"
ExitTestIteration
End If
'-----------------------------------------------------------------------------------------------------------------------------------------------------
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Mention when to use function procedures and what are its characteristics?
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
Explain about filter expression?
When to use function procedures and what are its characteristics?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
What if you do not specify anything when you call a procedure?
Mention what is vbscript?
What is the use of option explicit in vbscript?
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
How to replace junk code recorded by QTP with a mall function.
Explain the extension .hta?
How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...
What are the rules to name variable in vbscript?
Explain the operator precedence in vb script?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?