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 to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Illustrate briefly about the different types of statement
where can i learn VB scripint ?
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.
did any one attended interview in applabs if you had gone through plz tell me the procedure
write a program to display configuration of a local system with the help of vb script.
Explain about the asc function?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
How to assign a date value to a variable?
Explain what is loose binding? Why is it not a good practice to use it?
how to check whether link is disabled in QTP??
What are events in the vbscript language?
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
What is the purpose of regexp object in vbscript?
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<