Generate the shortest Css Path to an element
WARNING: I made this for a project I am working on. Please do your own due deligence. I am not responsible for any issues when using my code.
Selector Precedence:
- Unique Attributes (aria-label, title, type)
- ID
- Class
- FullPath
NOTE : Some sites have Randomized ID and/or CLASS generation on every pageload. Disable them and rely on full path in such cases.