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
Out of the different type of operators, which are evaluated first and last in the vbscript language?
Write a Script for ATM in QTP
Which in-built function related to an array joins substrings into one string in the vbscript language?
how does vb script help in web page designing? explain with example.
Can u describe what kind of testing are for OTC derivates by banks.
What methods are used to create text files and open text files in the vbscript language?
Mention what is vbscript procedures?
how to increasing the numbers in a given text box please write a vb script
Can anyone send me a vb script function for verifying the functionality of active links on a web page
What are subprocedures in vbscript?
What are class variables?
How should i Create Email invite with server-side Coding?
What is event handling in vbscript?
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.
How to open a file. What is the perpose of true and false mode there?