How to find xpath of an element in firefox inspector

后端 未结 10 724
清酒与你
清酒与你 2020-12-14 05:57

In Firefox 50.1, Firebug is no longer available so I have to use the inspector but I cannot find copy ---> xpath option that was available in Firebug. How can I find the xpa

相关标签:
10条回答
  • 2020-12-14 06:47

    Unfortunately this doesn't work properly. When I use the copy xpath, I got this instead of the usual one: //*[@id="gwt-uid-105"] Which is just useless :(

    There aren't any extension currently which could solve this. Looks like the only way is to run an old version of FF. Can have an old 32 bit and a new 64 bit version.

    0 讨论(0)
  • 2020-12-14 06:51

    In Firefox you can use the web developer tools console for xpath validation like this:

    1.Open Web Developer tools.

    2.Click on Console

    3.Type $x("path")

    This should let you validate that your path is valid.

    0 讨论(0)
  • 2020-12-14 06:52

    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

    0 讨论(0)
  • 2020-12-14 06:56

    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

    0 讨论(0)
提交回复
热议问题