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
How will you get the largest subscript of an array in vbscript?
There are 5 web pages.write a script to click the button on 4th web page.
Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com
What is dictionary object in vbscript? Explain?
Explain the filter expression?
Mention characteristics of sub procedures?
How to delete a cookie using vbscript?
What is the use of option explicit statement?
What are the naming conventions while declaring a variable in the vbscript language?
Which loop is used in case of arrays in the vbscript language?
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.
Explain about constants in vb script?
where can i learn VB scripint ?
1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.
Explain the functionality of vbscript?