Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch IE, complete web form and submit. Errors 800A01A8 and 800a01b6

Status
Not open for further replies.

wallner77

Technical User
Feb 4, 2015
3
US
I'm trying to create a script that inputs ID, PW and then submits to a web form at this website. It seems I have the ID and pw fields populating but I am getting an error code 800A01A8 or 800a01b6 when trying to submit or click. I have no experience, I appreciate any help you may be able to provide.

Code:
Call Main

Function Main
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "[URL unfurl="true"]https://intelliconnect.cch.com/scion/auth.jsp?disableAutoLogin=true&authcpid=WKUS-TAA-IC"[/URL]
Wait IE
With IE.Document
    .getElementByID("vClasicLogin_UserId").value = "xxxxx"
    .getElementByID("vClasic_LoginPassword").value = "xxxxxxxx"
    .getElementByID("vClasicLogin").submit
End With
End Function

Sub Wait(IE)
  Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
End Sub
 
Looks like you are filling in the form fine but the focus won't shift to enable the button. You have to tab through to activate the button. You can do it like this:

Code:
Call Main



Function Main
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "[URL unfurl="true"]https://intelliconnect.cch.com/scion/auth.jsp?disableAutoLogin=true&authcpid=WKUS-TAA-IC"[/URL]
Wait IE
With IE.Document
    .getElementByID("vClasicLogin_UserId").value = "xxxxx@xxx.com"
    .getElementByID("vClasic_LoginPassword").value = "xxxxxxxx"
    .getElementByID("vIpLogin").Click
End With
End Function
set WshShell = CreateObject("WScript.Shell")
WShShell.AppActivate("InternetExplorer")
WSHSHell.SendKeys "{tab}"
WSHSHell.SendKeys"{ENTER}"
Sub Wait(IE)
Do
	WScript.Sleep 800
	Loop While IE.ReadyState < 4 And IE.Busy
End Sub

I hope that helps.

Regards,

Mark

No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at
Work SMARTER not HARDER.
 
Thanks Markdmac!

When I run that it opens a second browser instance but doesn't submit. I see what you are doing with the sendkey, I will try and get it to do that within the first browser window, actually two tabs and then enter.

Wish me luck and thanks for the reply!!
 
Been farting around for an hour, I can't get the send keys portion to stop opening a 2nd window.
 
SendKeys does nothing but press keys, it does not open another window. Make sure you have all IE processes closed before running the script. Check in Task Manager. The AppActivate sets the focus to the IE process. You may need to add code to kill all IE processes first. It sounds like you have multiple IE processes running and AppActivate is setting focus to the wrong one.

I hope that helps.

Regards,

Mark

No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at
Work SMARTER not HARDER.
 
PS: When I run the script on my side with no IE windows running it tries to login. Since I am sending garbage credentials I get notified the ID or password is bad, so clearly it is submitting for me.

I hope that helps.

Regards,

Mark

No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at
Work SMARTER not HARDER.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top