Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Script breaking behavior when using IE10 on Win7

$
0
0
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()

[ autoit ]      
#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.

Viewing all articles
Browse latest Browse all 12506

Trending Articles