It is always suggested & good to use id, name, className & other selectors in place of XPath but
- Do we get to know just by looking at the DOM, if these selectors are unique?
- Is there a simple way to verify the uniqueness of name, className, id, tagName, linkTest & partialLinkText? (We can verify but that will be time taking)
- Can we use any selector in our script without verifying it’s uniqueness?
And there are many such questions and I believe the answer for most them is “NO”.
Then how to solve these problems?
Here is the single click solution for all these problems.
AutonomIQ ChroPath gives all the possible selectors just in single click along with their occurrence. It also highlight the occurrence in green and orange color which help to understand easily which one should be used in script. This is a free tool.
Please follow this video tutorial to make the best use of AutonomIQ ChroPath.