xeroTechnologiesLLC Posted September 14, 2012 Share Posted September 14, 2012 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 $oIE.Navigate2($cityStatePageLink) ; wait While $oIE.Busy WEnd $doc = $oIE.document ; wait for it... While $doc.ReadyState <> "complete" WEnd $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. Link to comment Share on other sites More sharing options...
bogQ Posted September 14, 2012 Share Posted September 14, 2012 (edited) 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 September 14, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - 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. Link to comment Share on other sites More sharing options...
xeroTechnologiesLLC Posted September 16, 2012 Author Share Posted September 16, 2012 I would assume it was because the visibility setting to true functions correctly. However, when I put the message box code in - nothing appears. No message box appears at all. Thoughts? Link to comment Share on other sites More sharing options...
xeroTechnologiesLLC Posted September 16, 2012 Author Share Posted September 16, 2012 (edited) 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 September 16, 2012 by xeroTechnologiesLLC Link to comment Share on other sites More sharing options...
xeroTechnologiesLLC Posted September 16, 2012 Author Share Posted September 16, 2012 So new occurrence of fun... the .visible option was not firing at all and IE8 was showing up. I tried using the built in autoIT functions, but those create the same error with IE8. Any thoughts? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now