Jump to content

Specify Second Identical String?


Go to solution Solved by HarshaKuchampudi,

Recommended Posts

Posted

Hello! I am new to the AutoIt Forums, so I apologize in advance if my question is unclear or doesn't make much sense.

I am trying to click a submit button on a webpage. The button has the following HTML:

<input type="submit" value="Search">

I am attempting to use the following code to click it:

$oTags = _IETagNameGetCollection($oIE, "input")
For $oTag In $oTags
If String($oTag.Value) == "Search" Then
_IEAction($oTag, "click")
_IELoadWait($oIE)
EndIf
Next

The problem is that the code above is selecting ANOTHER submit button with the same HTML line that comes before the desired button. Is there any way that I can specify to click the second submit button rather than the first?

Thank you for your help!

Harsha

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...