How Do I Use XPath Following Sibling to Target the Next Element? or Struggling with XPath Following S

20 Replies, 1990 Views

Honestly, I gave up on xpath following sibling for complex cases and switched to CSS selectors. Way easier for siblings:
`div.item + div`

But if you’re stuck with XPath, try `following-sibling::*` to catch any element type. Might help if the HTML is messy.

Messages In This Thread



Users browsing this thread: 1 Guest(s)