Jump to content
Sign in to follow this  

Trying to find the name of a table row that holds an image.

Recommended Posts


Background data:

I have a webpage that dynamically produces data, it places a check mark next to any of 4-6 options to indicate accuracy. I want to develop a way to target those options checked. The format is as follows:






A total of 10 sets, and the check placement is random among the 4-6 options. The HTML relevant is as follows:

<td id="LID9_4"><img src="correct.gif"></td><td style="text-align: right;" valign="top"><nobr><input disabled="disabled" value="LID9_4" name="Answer9" type="radio"><b>Option 4

I need to pair the 9 and the 4 from LID9_4 into a variable for later use. The format of the LID9_4 is Set9 Option4.

The thing I am having the most trouble with is locating that correct.gif and then pairing it with the LID9_4. I could develop an array for those if I could isolate them.

Share this post

Link to post
Share on other sites

check out _IEGetObjByName

Share this post

Link to post
Share on other sites

Yes, _IEGetObjByName occurred to me, but I cannot come up with a creative way of determining which one of the LIDx_y names is followed by the <img src="correct.gif">

Share this post

Link to post
Share on other sites

Something like this perhaps:

$oTDs = _IETagnameGetCollection($oIE, "td")
For $oTD in $oTDs
    If StringInStr(_IEPropertyGet($oTD, "innerhtml"), "correct.gif") Then
        ;;; Found one


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