ktoya Posted May 29, 2014 Share Posted May 29, 2014 there are 2 tabs in current IE window www.a.com www.b.com and www.b.com is activated now I want to jump to www.a.com the code is working in my Windows 7 x64 with IE 11. however it is not working in my windows xp VM with IE 8. here is my code: #Include <IE.au3> local $oIE $oIE=IEAttachByUrl($oIE,"http://www.google.com/") ;MsgBox(0,_IEPropertyGet($oIE, "locationurl"),_IEPropertyGet($oIE, "HWnd"))) WinActivate(_IEPropertyGet($oIE, "title")) Func IEAttachByUrl($IE, $url) local $urlMatch Local $aIE[1] $aIE[0] = 0 Local $i = 1, $oIE While 1 $oIE = _IEAttach("", "instance", $i) If @error = $_IEStatus_NoMatch Then ExitLoop $urlMatch=_IEPropertyGet($oIE, "locationurl") ConsoleWrite($urlMatch) if $url=$urlMatch Then return $oIE EndIf ReDim $aIE[$i + 1] $aIE[$i] = $oIE $aIE[0] = $i $i += 1 WEnd ;MsgBox($MB_SYSTEMMODAL, "Browsers Found", "Number of browser instances in the array: " & $aIE[0]) EndFunc Link to comment Share on other sites More sharing options...
Danp2 Posted May 29, 2014 Share Posted May 29, 2014 Did you try using _IEAttach like this? $oIE = _IEAttach("http://www.google.com/", "url") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ktoya Posted May 29, 2014 Author Share Posted May 29, 2014 yes I tried and it is also working fine in IE 11, but still not working in IE8. does Autoit no longer support low version of IE? Link to comment Share on other sites More sharing options...
Danp2 Posted May 29, 2014 Share Posted May 29, 2014 Please expand on "not working in IE8". Is the _IEAttach failing or is the tab just not becoming active (topmost)? Latest Webdriver UDF Release Webdriver Wiki FAQs 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