views:

22

answers:

1

How do I locate a table row based on table cell data using the following HTML snippet:

<table id="BetaCustomersTable>
  <s:iterator>
    <tr>
      <td class="userTabletd">
        <s:property value="email" />
      </td>
    </tr>
  </s:iterator>
</table>
+2  A: 

To locate a table row based on it containing a cell with specific text you can use the following XPath locator:

//tr[td[text()='myCellText']]
Dave Hunt