Friday, 19 April 2013

Function to Log onto Gmail using QTP

//Action for Logging in:----

If  browser("Gmail: Email from Google").Page("Gmail: Email from Google").Link("Can't access your account?").Exist(5) then

Call glogin("yourusername","yourpassword")


Else

Msgbox "User is already logged on"

End If


// Function Definition
Function glogin(byval struname,byval strpwd)


 browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set struname
 browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Passwd").Set strpwd
 browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebButton("Sign in").Click


End Function



















No comments:

Post a Comment

Spring Boot : Exception Handler 14