Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I select the next `td` in this `tr`? [duplicate]

Tags:

xpath

I want to select the next sibling of a td tag in a tr element.

The tr element is this:

<tr>
  <td>Created On:</td>
  <td>06/28/2018 06:32      </td>
</tr>

My XPATH code looks like this: //text()[contains(.,'Created On:')].

How do I select the next td?

like image 696
Username Avatar asked Nov 04 '25 13:11

Username


1 Answers

Try it like this:

//tr/td[text()="Created On:"]/following-sibling::td

Demo

like image 51
wp78de Avatar answered Nov 07 '25 14:11

wp78de