What i'm trying to do is to get an element out of a list. I want to take the text in a link and click on the link if it contains the right text. this is the html-code:
<table>
<tr>
<td><a href='...'>I need help</a></td>
<td><a href='...'>Oh hello</a></td>
<td><a href='...'>Lorem ipsum</a></td>
</tr>
</table>
I tried this:
.click('table > tr > td > a:contains("I need help")')
But for some reason it doesn't work.
I can't use this:
.click('table > tr > td:nth-child(1) > a)
because there will be added more tr tags as the site gets bigger.
Any ideas ?