Jump to content
Sign in to follow this  

getElementById IE8 and Win7 Enterprise 32

Recommended Posts

I had written a program to boost our outage processes at work and then IT decides now we are upgrading to Windows 7 and we ran into a bug with how I have the IE object setup and pass values to it.

Below is the code that I currently have that does not work with IE8 in win7 enterprise 32bit.

Global $oIE = ObjCreate("InternetExplorer.Application")
; navigate to the page
; wait
While $oIE.Busy
$doc = $oIE.document
; wait for it...
While $doc.ReadyState <> "complete"
$oIE.Visible = True
; getting element obj ID
$city = $doc.getElementById("city")
$state = $doc.getElementById("state")
; set values
$city.value = "test"
$state.Value = "test"

I did some research on 'getelementbyid' with ie8 and win7 and there is a case sensativity issue in ie8, but i built the program to be a direct match to the ID in the site - so I know it is right. Any thoughts on how to manage this?

I narrowed it down to the .getelementbyID section because the program runs and displays the IE window then crashes....which the visibility trigger is the last thing to happen before it hits the .getelementbyid tags.

Thanks in advance.

Share this post

Link to post
Share on other sites

can you confirm that $oIE.document returned object and that its on that line error with MsgBox(0,'',IsObj($doc))?

did msgbox popup? did it return some result?

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)

There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.


Share this post

Link to post
Share on other sites

I commented out the $doc = $oie.document line and let it run on and tried various alterations of the document.getelementbyid and it simply seems to refuse to work. So what is different in IE8 other than the case sensitivity of an ID or name?

The line that errors:

$doc = $oIE.document

The requested action with this object has failed.

Edited by xeroTechnologiesLLC

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...