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
1. How do declare public variable in vb scripts?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..
How to delete a cookie using vbscript?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
How will you check that a variable is an array in vbscript?
What are class properties?
When are redim statement and preserve keyword used in the vbscript language?
Difference between dim,public and private variables in vb script?
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
Explain about the support of asp for vb script functionality?
Explain the .wsf files?
How to open browser in vb script?
Mention what is vbscript?