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
Explain about filter expression?
What is byref and byval parameters in vbscript?
can anyone tell me the procedure of interview held in applabs
Which function allows you to instantiate an object given its programmatic identifier or progid?
How will you convert a given number to long in vbscript?
Explain about constants in vb script?
Explain about adodb.stream class?
Which operator can be used to do an xor operation in vbscript?
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
Which operator is used to concatenate the 2 values in the vbscript language?
Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?
What is the use of the date function in the vbscript language?
Explain the adodb.stream class?
If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?
Explain about the asc function?