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
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
after medical test,when will be the police verification
How will you get a random number between 0 and 1 in vbscript?
i need to sort the data using qtp script for this how i need to write a qtp script
When are redim statement and preserve keyword used in the vbscript language?
Mention what is byref and byval parameters in vbscript?
How will you convert a string to upper case string using vbscript?
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
Mention what is the difference between vbscript and vba?
How to open browser in vb script?
Explain the tristate constants in vbscript?
how to check whether link is disabled in QTP??
How can you destroy an object in vbscript?
How to declare an array in vbscript?