I am trying to find an element in a webpage based on the child of the child of the element I want. I need this because it is the clickable part of the webpage.
<table id="uniqueId">
<tbody>
<tr></tr>
<tr class="row" onclick="do_a_thing">
<td>
<input type="hidden" value="1" />
</td>
<td>
<input type="hidden" value="1" />
</td>
</tr>
<tr class="row" onclick="do_a_thing">
<td>
<input type="hidden" value="2" />
</td>
<td>
<input type="hidden" value="1" />
</td>
</tr>
<tr class="row" onclick="do_a_thing">
<td>
<input type="hidden" value="3" />
</td>
<td>
<input type="hidden" value="1" />
</td>
</tr>
</tbody>
</table>
I currently have the following xpath to select the table row that contains the attribute where an input has value = 2:
//*table[@id='uniqueId']//tr[td[0]/value='2']
According to a previous question, this should work. Why doesn't it work here?