-2

I need to make an XPath.

I am writing a script and trying to get an exact element from the page.

  • Something like `//element[boolean(@starts-with) and not boolean(@end-with)]`? Have you tried anything at all? – f1sh Apr 04 '22 at 11:40
  • It would be helpful if you could provide an example demonstrating the HTML or XML that you are trying to target and better explain what you are looking for. – Mads Hansen Apr 04 '22 at 12:03

1 Answers1

1

Selenium supports

Where as ends-with() isn't part of xpath v1.0 but a part of xpath v2.0 specifications.

Hence, you can't use the ends-with() clause directly.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352