Jump to content
Sign in to follow this  

IE.au3 Version 3.2 vs - Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

Recommended Posts


This is a bizarre thing. I have around 6000 lines of AutoIt code that was working wonderfully and I was using version 3.2 of IE.au3. A coworker had his AutoIt upgraded to a newer version which has version and now he can't run the existing code without errors occurring immediately.

I've taken a copy of his IE.au3 and copied into a shared server's common folder from which I am running my .au3 scripts and called it IEnew.au3 and I have my older copy of IE.au3.

I've created a simple snippet of code to demonstrate what I am seeing when I F5 them:

#include "IEnew.au3"

$url = "http://localhost:8082/myapp"

Local $oIE = _IECreate($url)

Local $oForm = _IEFormGetCollection ($oIE, 0)

Local $oQuery = _IEFormElementGetObjByName($oForm, "username")

_IEFormElementSetValue($oQuery, "hello")

When I run that, I get the error:

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

Same code, if I change the include to be "IE.au3" and run it again, my textbox is populated successfully.

Is this because I have IE.au3 in C:\Program Files\AutoIt3\Include as well? (I don't have permission to the C:\ files to experiment, would have to contact our systems people so I'd like to know if that's the issue before I do that.)

Share this post

Link to post
Share on other sites

Copy your IE.au3 to IEold.au3 and try again with include IEold.au3

If you like my post, just click the like button :) 

Share this post

Link to post
Share on other sites

It works with IEold.au3, not with IEnew.au3.

Share this post

Link to post
Share on other sites

I would ber concerned that there are problems with the AutoIt installation on your co-worker's system. There have been changes made to AutoIt that precipitated changes to IE.au3 that would cause that error if you run the new IE.au3 with older AutoIt (just as you are).


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this