Issue
I am using Selenium to identify any HTML element that may have a specified value in any of its attributes. I was hoping that there would be some way in XPath to do this, but I haven't been able to find any answers yet.
Solution
First, you have to transform HTML into xhtml if you want to apply xpath selections on it.
The xpath for selecting an (x)html element having a specified value in one of its attributes is:
//*[@*="specified value"]
Answered By - Pierre François
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.