-3

Firefox not showing relative xpath for any element. I am using Firefox version 56.0(32 bit)

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
Sgharage
  • 1
  • 6
  • 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 Answers2

0

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: enter image description here 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.

For example: enter image description here

Zakaria Shahed
  • 2,589
  • 6
  • 23
  • 52
0

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.

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132