Jump to content
Sign in to follow this  

click a button that has no name or ID in iframe

Recommended Posts

How do I click a button in an iframe that does not have a name or id? I tried using $oButtons = _IETagNameGetCollection($oIE, "button") but it does not find any. Here is a snipit of the ie.

<TD align=right><INPUT class=FlatButton style="WIDTH: 70px" onclick=OnCancel() type=button value=Cancel></INPUT> <INPUT class=FlatButton style="WIDTH: 70px" onclick=OnBack() type=button value=Back></INPUT> <INPUT class=FlatButton style="WIDTH: 70px" onclick=OnDataExport() type=button value=Next></INPUT> </TD></TR></TBODY></TABLE></DIV><!-- Next step for Palm Export -->

I have uploaded the complete iframe where this is contained. In the iframe it shows three buttons Cancel Back Next. I am trying to click next but _IETagNameGetCollection will not find it and shows up empty.

$oButtons = _IETagNameGetCollection($oIE, "button")

For $oButton in $oButtons

$oButtonTxt=_IEPropertyGet($oButton, "innertext")

;MsgBox(0, "Button Info", $oButtonTxt)

if $oButtonTxt="Nextt" Then




Share this post

Link to post
Share on other sites

If it is in an iFrame, you must first get a reference to it with either _IEFrameGetObjByName or _IEFramgeGetCollection with an Index and then use the object returned in place of $oIE. See the examples in the helpfile.


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...