Good afternoon community, I'm trying to rescue the text of the following element:
<table class="GroupsTable">
<tbody>
<tr>
<td>
<input type="checkbox" name="chk" value="1">
" texto no seleccionado"
<br>
<input type="checkbox" name="chk" value="5" checked>
" texto seleccionado"
<br>
<input type="checkbox" name="chk" value="3">
" texto no seleccionado"
<br>
<input type="checkbox" name="chk" value="21" checked>
" texto seleccionado"
<br>
<input type="checkbox" name="chk" value="12">
" texto no seleccionado"
<br>
<td>
</tr>
</tbody>
</table>
The problem is that the text itself is outside the element and I can not capture it
Try as follows:
String include = driver.findElement(By.xpath("(//table[@class='grid contractGroupsTable']/tbody/tr[2]/td[3]/input[@checked])[1]")).getText()
This returns an empty text to me.
Any help or suggestion is welcome, thank you very much !!