Exit Posted March 11, 2013 Share Posted March 11, 2013 Script breaking behavior when using IE10 on Win7 When using _IExxx functions with IE10 on Win7, there are incompatibility issues. Here a sample with _IEGetObjByName() and _IEGetObjById() #include <ie.au3> _IE_VersionInfo() $oIE=_iecreate("Google.com") consolewrite(@crlf&_IEPropertyGet($oIE,"appversion")) $Object=_IEGetObjByName($oIE,"gbqfq") ConsoleWrite(@crlf&" Error on ByName: "& @error&@crlf) $Object=_IEGetObjById($oIE,"gbqfq") ConsoleWrite(@crlf&" Error on ById: " & @error&@crlf) _IEQuit($oIE) Console output with IE9 >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Hubertus\Desktop\try##.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams +>22:33:38 Starting AutoIt3Wrapper v.2.0.3.0 Environment(Language:0407 Keyboard:00000407 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.19.0) from:C:\Program Files (x86)\AutoIt3 +>22:33:39 AU3Check ended.rc:0 >Running:(3.3.6.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Hubertus\Desktop\try##.au3" --> IE.au3 V2.4-0 Information from function _IE_VersionInfo, version V2.4-0 (Release date: 20071231) 5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C) Error on ByName: 0 Error on ById: 0 +>22:33:52 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 15.536 Console output with IE10 >"G:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "O:\Data\AutoIt\try##.au3" /UserParams +>22:41:00 Starting AutoIt3Wrapper v.2.1.0.33 Environment(Language:0407 Keyboard:00000407 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) from:G:\Program Files (x86)\AutoIt3 +>22:41:00 AU3Check ended.rc:0 >Running:(3.3.8.1):G:\Program Files (x86)\AutoIt3\autoit3.exe "O:\Data\AutoIt\try##.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop --> IE.au3 V2.4-0 Information from function _IE_VersionInfo, version V2.4-0 (Release date: 20071231) 5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)--> IE.au3 V2.4-0 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: gbqfq, Index: 0) Error on ByName: 7 Error on ById: 0 +>22:41:02 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 3.223 HTML code <input name="q" class="gbqfif" id="gbqfq" style='background: ... skipped some lines ...> As you can see, in IE10 _IEGetObjByName() returns @error=7. In IE9 it returns @error=0. The Id was taken instead. So some of my scripts refused to work. Login button was not pressed since I used ByName instead of ById. I think, there are more incompatibilities between IE9 and IE10. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
jdelaney Posted March 11, 2013 Share Posted March 11, 2013 (edited) Does IE10 have xpath searching yet? They are way behind the times. (sorry to not specifically address your issue) Edited March 11, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 12, 2013 Share Posted March 12, 2013 (edited) @Exit, I never really understood why it was the case, but in all prior versions of IE, IDs shared the same namespace with Names. They finally decided to tighten that up in IE10. Personally, I never relied on this behavior and was always careful to use _IEGetObjByName for Names and _IEGetObjByID for IDs. You'll need to do the same. Dale @jdelaney - unfortunately no, still no xpath Edited March 12, 2013 by DaleHohm 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 Link to comment Share on other sites More sharing options...
JohnOne Posted March 12, 2013 Share Posted March 12, 2013 I never knew it behaved like that in the past, glad I never now really AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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