In selenium IDE,
I need to find the 3rd link whose text is ‘XXX’
<tr>
<td>clickAndWait</td>
<td>//a[text()='XXX'][3]</td>
<td></td>
</tr>
error: element not found, any idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As answered in my comment on selenium scripts
It may be because of a subtlety in XPath where
//a[1]will select all descendant a elements that are the first para children of their parents, and not the first a element in the entire document. It might work better for you to use something like//body/descendant::a[1]or anchor it to an element with an id likeid('myLinks')/descendant::a[1]. Note that for the last example you would need to proceed the locator withxpath=.