Question

IELinkClickByText ($oIE, "Continue") throws a warning: IE.au3 T3.0-1 Warning from function _IELinkClickByText, $_IEStatus_NoMatch

_IEAction ($oSubmit, "click") throws an error: _IEAction(click), $_IEStatus_InvalidDataType

Similarly many IE functions( _IEPropertySet, _IEGetObjById) are failing in IE10, even though these functions are working in IE9.

Can anyone suggest a solution to overcome this problem?

Was it helpful?

Solution

Try enabling compatibility mode for IE before running your code.

    $64Bit = ""
    If @OSArch = "X64" Then
        $64Bit = "64"
    EndIf
If StringLeft(RegRead("HKLM" & $64Bit & "\SOFTWARE\Microsoft\Internet Explorer\Version Vector", "IE"), 1) > 8 Then ;Check for version 9 or later


  $wshNetwork = ObjCreate("WScript.Network")
  $struser = $wshNetwork.Username
  $objWMIService = ObjGet("winmgmts:\\.\root\cimv2")
  $objAccount = $objWMIService.Get('Win32_UserAccount.Name="' & $struser & '",Domain="' & @ComputerName & '"')
  RegWrite("HKU" & $64Bit & "\" & $objAccount.SID & "\Software\Microsoft\Internet Explorer\BrowserEmulation\", "AllSitesCompatibilityMode", "REG_DWORD", 1)
  RegWrite("HKU\" & $objAccount.SID & "\Software\Microsoft\Internet Explorer\BrowserEmulation\", "AllSitesCompatibilityMode", "REG_DWORD", 1)
EndIf
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top