Firefox not showing relative xpath for any element. I am using Firefox version 56.0(32 bit)
-
What have you tried so far? What is the result? Also, do you really mean Firebug or actually the [Firefox DevTools](https://developer.mozilla.org/en-US/docs/Tools)? – Sebastian Zartner Oct 23 '17 at 07:58
2 Answers
There has a problem with the latest version of Firefox(56.0).You need to downgrade your firefox for the version to solve this.Alternatively, you can use chrome to verify XPath
You can copy xpath:
You can open a Console in Chrome, and check the XPath by typing
$x("your_xpath_here")
. This will return an array of matched values. If it is empty, you know there is no match on the page.

- 2,589
- 6
- 23
- 52
The Firefox DevTools copy the absolute XPath when you right-click an element within the Inspector and choose Copy > XPath from the context menu.
That's the same what Firebug did. Only FirePath (a Firebug extension for creating XPaths and CSS selectors) and the Chrome DevTools create a relative path to the selected element.
I have now filed bug 1410810 asking to adjust the Firefox DevTools to also create a relative XPath.

- 18,808
- 10
- 90
- 132