How to write an xpath for a specific text from a whole attribute?



  • So the problem statement is:

    I need to store a specific number(marked in RED) from the attribute & for that I want to point to that number in an xPath. Is that possible? enter image description here



  • You need to get the innerHTML via getAttribute("onmouseover") function and parse the String using a regular expression. There is no direct approach from Selenium.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2