Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best XPath tools [closed]

Tags:

xpath

devtools

What tools are you guys using for XPath and why? Right now I'm using

  • SketchPath because its totally awesome, but its a windows app that needs to be installed
  • WhiteBeam online XPath test bedbecause you can test expressions from the website

SketchPath seems to stand out the most to me because it actually helps you create the xpath and it is very advanced. If you haven't tried it you should.

Cons to SketchPath: you have to install it on the machine, otherwise it is fantastic.

Cons to WhiteBeam: you have to upload your file which I don't always want to do for security reasons and the file size you can upload has some limit on it, and uploading a file is annoying anyways. Also I think there might be some subtle differences between the xpath used for that tool and when running a .NET app. But don't remember any right now. Just keep it in mind.

like image 993
Sayed Ibrahim Hashimi Avatar asked Jan 02 '10 13:01

Sayed Ibrahim Hashimi


People also ask

What is the easiest way to find XPath?

Go to the First name tab and right click >> Inspect. On inspecting the web element, it will show an input tag and attributes like class and id. Use the id and these attributes to construct XPath which, in turn, will locate the first name field.

How does XPath finder work?

XPath Finder is one of the most straightforward Chrome extensions for determining the XPath of a WebElement and may quickly install this extension on Chrome and begin searching for XPaths with good compatibility on the device. Chro path can also be used as a selector to find the path in a chrome browser.


2 Answers

[Update] XMLQuire was originally recommended in this answer. It was a free XML editor for Windows with the SketchPath XPath Editor built in for XPath testing.

XMLQuire has not been maintained for a few years and has now been retired.

For XPath experimentation etc. XMLQuire's author now recommends the XPath Notebook extension for Visual Studio Code. Developed by the same author, this now supports XPath 3.1 courtesy of Saxonica's Saxon-JS processor.

enter image description here

like image 127
pgfearo Avatar answered Oct 04 '22 20:10

pgfearo


If you're in a web dev environment, Firefox has a number of great tools for XPath support and analysis:

  • Firebug has built-in XPath support
  • XPath Checker I have found to be great

and also maybe of use:

  • XPath Runner
  • FireXPath

Be careful with Firebug - the right-click "copy XPath" command copies the path as all lower-case, and some XML parsers (like the MXSML parser used in FinalBuilder) are case-sensitive - so you'll need to correct the casing of your Firebug-copied XPath statement otherwise your parser won't find any matching nodes.

like image 34
Richard H Avatar answered Oct 04 '22 21:10

Richard H