I'm developing an extension that allows the user to select an element and then highlight it whenever he visits the website, is there a way to programmatically get the xpath of an element?
I tried using classes, ids and tagnames but its not a reliable way to identify an element because its not guaranteed to exist.