how to write vb script code for login gmail page by using
notepad and how to run script in notepad
Answer Posted / bittu
Write the below code in atext file and save it with .vbs
extension and run it. U will login into gmail automatically.
Provide the credentials in the line 10 & 11.
---------------------------------
WScript.Quit Main
Function Main
Set IE =
WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "http://www.gmail.com"
Wait IE
With IE.Document
.getElementByID("Email").value = "abcd"
.getElementByID("Passwd").value = "xyzp"
.getElementByID("gaia_loginform").submit
End With
End Function
Sub Wait(IE)
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
End Sub
Sub IE_OnQuit
On Error Resume Next
WScript.StdErr.WriteLine "IE closed before script finished."
WScript.Quit
End Sub
| Is This Answer Correct ? | 0 Yes | 10 No |
Post New Answer View All Answers
I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.
What are the 2 ways in which a variable can be declared in the vbscript language?
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 the tristate constants in vbscript?
What are lbound and ubound in the vbscript language?
Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?
Which data type/types are supported by vbscript language and what are their specialties?
What is the difference between VBScript and JavaScript?
What is the purpose of regexp object in vbscript?
after medical test,when will be the police verification
Explain the filter expression?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
Explain what is loose binding? Why is it not a good practice to use it?
What is the use of the formatdatetime function in the vbscript language?
What is the purpose of on error resume next statement?