Sign in to follow this  
Followers 0
saldous

IE6 and IE7 results when using _IELinkGetCollection

2 posts in this topic

#1 ·  Posted (edited)

When I'm using IE7 my script runs fine with:

$oPLinks = _IELinkGetCollection ($oIE, 9)
_IEAction ($oPLinks, "click")

But when I run the same script on a machine running the IE6 browser the link number 9 is different and it clicks the wrong link / not the one I'm wanting it to click.

How can I get the results of IELinkGetCollection to be the same when using these two browser versions? Otherwise my script will not work correctly on all the machines deployed in my environment.

The only other work around I can think of is doing a check on which browser is install on the users PC and then running the appropriate link script for that browser, but I don't really want to have to do this, and I don't know how to find out which version is running either.

Thanks.

Edited by saldous

Share this post


Link to post
Share on other sites



This will be very disappointing assuming you are correct. IE.au3 is unfortunately at the mercy of the DOM (Document Object Model) implementation in IE.

To verify this I would request taht you run the following code in each browser and compare the results:

$oLinks = _IELinkGetCollection ($oIE)
ConsoleWrite("Number of links found: " & @extended & @CR)
$i = 0
For $oLink in $oLinks
    ConsoleWrite($i & ": " & $oLink.href & @CR)
    $i += 1
Next

Then compare the results of looking at the same page in IE6 and IE7

Dale


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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0