0

how is it possible to easily obtain short form of XPATH through Inspector? For example, if I try "Copy xpath" on web element I get pretty long response like this:

/html/body/div[6]/div[1]/div[1]/p[13]

Instead of this or similar:

//[@id='exeample_value']*

Since I need to cover a lot of these, do not want to loose time to shorten them manually. In older versions of Firefox I used plugins like Firebug and Firepath, but they seem not to be compatible with new FF versions (and FF Dev Edition).

YggY
  • 57
  • 1
  • 2
  • 8

1 Answers1

0

The Firefox DevTools don't allow to copy relative XPaths yet (as of Firefox 58). Therefore I've filed bug 1410810 for it some time ago.

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
  • Thanks for reply. I have Firefox 59 and seems that the thing is not covered yet. – YggY Feb 15 '18 at 09:07
  • Yes, the bug report is still open, that means it is also not available in Firefox 60, unfortunately, which is currently in Nightly channel. I just wrote 58, because that's the current stable version of Firefox. If you want to support that, you can vote for it. – Sebastian Zartner Feb 15 '18 at 13:35