Im using selenium in python in order to check if a text between font tags in contained and getting the tag tbody back if it is.
the html code:
<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#000000" height="80">
<tbody>
<tr bgcolor="#666699">
<td height="17" bgcolor="#CCCC99">
<font size="2"><b><font face="Arial, Helvetica, sans-serif">PARTY 1</font></b></font>
</td>
</tr>
<tr>
some html code...
</tr>
</tbody>
</table>
As you can see the this is an example i need to check in the html page if the has PARTY 1 in it and if so getting the tbody element back. I should say that there is no way to get the element using id because there are other tables written in the same way. I'v already tried using //font[contains(.,'PARTY 1')] but as it didnt worked
what is the best way to use selenium and check if PARTY 1 is in the and get tbody elment back??