I'm writing a VBScript to navigate to a secure site and log in. The log in process has a radio button to select which part of the company you are with and 2 fields one for employee id and your password.
I can launch the IE object and navigate to the logon page and enter my employee id and password but I cannot figure out how to select a radio button. Any Ideas?
So far:
' Create an instance of the Internet Explorer object
Set objIE = WScript.CreateObject ("InternetExplorer.Application"
' Make the window visible
objIE.Visible = True
' Navigate to the pilot web site logon
objIE.Navigate "
do while objIE.busy
' wait for the page to load
loop
' Logon to the site. Using form information
objIE.document.forms(0).Employeeid.value="xxxxx"
objIE.document.forms(0).password.value="xxxxx"
objIE.document.forms(0).submit
I've tried:
'objIE.document.forms(0).Airline.value="AS"
'objIE.document.forms(0).Airline.value="checked"
for the radio button but no luck. The web source:
<input type="radio" name="Airline" value="AS" onclick="setvalue('arctic_on');"><font face="arial" size="2" color="black">Alaska
<input type="radio" name="Airline" value="QX" onclick="setvalue2('arctic_on');"><font face="arial" size="2" color="black">Horizon
Any ideas?
Thanks,
Dave
I can launch the IE object and navigate to the logon page and enter my employee id and password but I cannot figure out how to select a radio button. Any Ideas?
So far:
' Create an instance of the Internet Explorer object
Set objIE = WScript.CreateObject ("InternetExplorer.Application"
' Make the window visible
objIE.Visible = True
' Navigate to the pilot web site logon
objIE.Navigate "
do while objIE.busy
' wait for the page to load
loop
' Logon to the site. Using form information
objIE.document.forms(0).Employeeid.value="xxxxx"
objIE.document.forms(0).password.value="xxxxx"
objIE.document.forms(0).submit
I've tried:
'objIE.document.forms(0).Airline.value="AS"
'objIE.document.forms(0).Airline.value="checked"
for the radio button but no luck. The web source:
<input type="radio" name="Airline" value="AS" onclick="setvalue('arctic_on');"><font face="arial" size="2" color="black">Alaska
<input type="radio" name="Airline" value="QX" onclick="setvalue2('arctic_on');"><font face="arial" size="2" color="black">Horizon
Any ideas?
Thanks,
Dave