-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>
Dave Hunt
  • 8,191
  • 4
  • 38
  • 39
rajesh
  • 1
  • Okay I found your HTML snippet - it was commented out. I also reworded your question, please let me know if I've misunderstood. Answer provided below. – Dave Hunt Jul 03 '10 at 10:19

1 Answers1

2

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
  • 8,191
  • 4
  • 38
  • 39