I struggle currently to find the correct xpath expression to select an input element where its parent/sibling element contains a specific text.
In the example below, I would like to select the "input" element where, in the same tr row, a td element with a specific text exists.
my example path - returns no match
//input[contains(../../../td/text(),"15-935-331")]
source code
<tr>
<td><a href="xxx" target="_blank">xxxx, yyyyy</a></td>
<td>Mr</td>
<td></td>
<td> 15-935-331</td>
<form id="betreuerModel" action="xxxx" method="POST">
<td class="tRight">
<input value="Bearbeiten" id="bearbeiten" name="bearbeiten" class="submit" title="Bearbeiten" type="submit"/>
</td>
</form>
</tr>
<tr>
// .. next row with same structure
</tr>