user1540435
user1540435

Reputation: 3

Convert XPath to CSS

//td[@class='Bu']/following::td[@class='Bu']

or

//td[@class='Bu'][2]

both are the same result when using XPath, so how can I change/convert them to CSS?

Upvotes: 0

Views: 392

Answers (1)

BoltClock
BoltClock

Reputation: 723618

You can only do this with a CSS selector if the second td.Bu is a following sibling (means they share the same parent), or their parents are siblings and there are only two of them:

td.Bu ~ td.Bu

If they're completely unrelated, then it's not possible with CSS.

Upvotes: 1

Related Questions