What I am 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>
<td>
<tr><a href='...'>I need help</a></tr>
<tr><a href='...'>Oh hello</a></tr>
<tr><a href='...'>Lorem ipsum</a></tr>
</td>
</table>
I tried this:
.click('table > td > tr > a:contains("I need help")')
But for some reason it doesn't work.
I can't use this:
.click('table > td > tr:nth-child(1) > a)
because there will be added more tr tags as the site gets bigger.
Any ideas ?