Selenium IDE and xpath - find the text / row in the table and select the radio channel

I use the Selenium IDE and get good results. I read a lot about the next marriage and previous brother, but I can not find the right switch.

Essentially, I want to find a row in the table with the word β€œtesting,” and then click the switch in the cell.

So far I can find the enter button // enter [@ type = 'radio']

and find text testing // a [contains (text (), 'testing')]

I tried to use this in ide

check | //input[@type='radio']/following-sibling::td[1]/a[contains(text(),'testing')]

but i get an error [error] locator not found: //input[@type='radio']/following-sibling::a[contains(text()[1],'testing')]

Any help to change this is really appreciated :)

Greetings

Damien

here is the main table ...

<tbody id="list">
<tr>
<th>
<label class="radio">
<input class="presentation_radio" type="radio" value="1" name="presentation_radio">
</label>
</th>
<td>
<a href="/link_to/document">testing </a>
</td>
<td>testing</td>
<td>Joe Acme</td>
<td>Presentation</td>
<td>03 May 2012</td>
<td>5 (1)</td>
</tr>
</tbody>
+3
source share
1 answer

xpath , td input sibling ( ), xpath :

//input[@type='radio']/following::td[1]/a[contains(text(),'testing')]

a, . , xpath :

//a[contains(text(),'testing')]/preceding::input[@type='radio'][1]

//tr[descendant::a[contains(.,'testing')]]//input[@type='radio']

xpath : http://msdn.microsoft.com/en-us/library/ms256456.aspx

+5

All Articles