Sgharage
Sgharage

Reputation: 1

In Firefox xpath not showing detail (relative) xpath for any element

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

Upvotes: -3

Views: 2552

Answers (2)

Sebastian Zartner
Sebastian Zartner

Reputation: 20105

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.

Upvotes: 0

Zakaria Shahed
Zakaria Shahed

Reputation: 2697

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

Upvotes: 0

Related Questions