Title: How to select a particular checkbox within a table?

I like to select one particular checkbox. The only reference I have is the name "first" or " second" as you can see in the html sample code.

The value attribute unfortunately is driven by an database and changes. Therefore I can not say that value="70" is always the first checkbox.

So the only way I can select the right checkbox is looking for the name "first/second" and then select the prior table cell checkbox.

Xpath buffs is there a way to do that?

I tried:

<td>storeAttribute</td>
<td>//tr[position()>1]/td[2][a=first]/preceding-sibling::tr/[EMAIL PROTECTED]</td>
<td></td>




HTML-code-sample:

<tbody>
<tr class="table_header">
        <th title="Mark group for deletion"></th>
        <th title="Click to view group properties">Name</th>
        <th>Type</th>
</tr>
<tr>
        <td><input name="cbxSelectGroup[]" value="70" type="checkbox"></td>
        <td><a href="">
        <td>Dispatch</td>
</tr>
<tr>
        <td><input name="cbxSelectGroup[]" value="69" type="checkbox"></td>
        <td><a href="">
        <td>Dispatch</td>
</tr>
</tbody>

***************************************
Bernd Paatsch


_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to