Sign in to follow this  
Followers 0
HarshaKuchampudi

Specify Second Identical String?

2 posts in this topic

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

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