I'm using selenium-webdriver
and want to get Text
value by using Keyword
as a start point.
<tr>...</tr>
<tr>...</tr>
<tr><td><font>Keyword</font></td></tr>
<tr>...</tr>
<tr>...</tr>
<tr><td>Text</td></tr>
<tr>...</tr>
<tr>...</tr>
I can get Keyword
element like this driver.find_element(:xpath, "//tr/td/font[text()='Keyword']")
, but I have no idea how to get Text
element from that Keyword
.
Text
is always different and the Number of tr
elements are undefined. But between Keyword
and Text
there are always two tr
elements.
How can I get the value by using xpath
?