So basically what I need help in is:
I want to search for BBXXCODE with selenium-3.141.0, and Python 3.8.5.
I'm using driver.find_element_by_xpath("//*[contains(text(),'BBXXCODE')]" which is working as expected. But I need to somehow extract the id of the <tr> tag on top, because I want to use driver.find_element_by_xpath('//*[@id="tr9"]/td[2]/h1').click() to click on the I need to select this text.
Is there a way to do this or should I stay searching via the I need to select this text instead of the code?
This is the code piece:
<tr id='tr9'>
<td></td>
<td role='gridcell'>
<span class='link'>I need to select this</span>
</td>
<td role='gridcell'>
BBXXCODE
</td>
</tr>
I hope it is mostly clear, if not, feel free to tell me I'll try to add more details to it. Thanks in advance