How to find xpath of an element in firefox inspector

Follow Bellow Steps:

Step 1 : Right click on page -> Select (Inspect Element)

Step 2 : Pick an element from the page

Step 3 : Right Click on highlighted html -> Copy -> Xpath

enter image description here


The bug related to losing ability to 'copy XPath' from firefox inspector is fixed, verified in Firefox 56 beta, and verified in Firefox 57 alpha: https://bugzilla.mozilla.org/show_bug.cgi?id=987877


You can use the console to check if the xpath you want return the correct element or not. $x("//div/xpath") https://developer.mozilla.org/en-US/docs/Tools/Settings

Tags:

Firefox

Xpath