I find XPath difficult to get my head around at times and am looking for a tools that I can point at a line in an xml config file an it will tell me the xpath to the attributes that I need.
Any help with this would be much appreciated>
I find XPath difficult to get my head around at times and am looking for a tools that I can point at a line in an xml config file an it will tell me the xpath to the attributes that I need.
Any help with this would be much appreciated>
I've used the "Buba XPath builder" to do this. SketchPath (now XMLQuire) may also do the trick:
Visual XPath is full of win.
The Best tool is Firepath when it is installed over Firebug. You can easily find the Xpath using it. But it only works with Mozilla The Download link is: https://addons.mozilla.org/en-US/firefox/addon/firepath/ Or simply go to addons and click get extensions and type firepath.
You need to have firebug installed.
I want to echo XPather as my tool of choice, although it's not yet (as far as I'm aware) available for the latest version of FF. In order to better learn XPath, XPather gives you two good benefits:
Most of the time in my work I find it's not important to find an XPath that matches, but the best match for what I'm looking for (most specific for speed, most general for flexibility and matching similar nodes).
Firebug itself will give you an exact XPath for an element, but it makes me think of writing automation tests in Selenium recorder — it's OK if you're targetting that particular node that will always be in that exact location on the page. Whereas you could be targeting an ad banner that you don't know the exact location of, but know it's rough whereabouts — the RHS column on every page, for instance. This often happens with a CMS backed site, if you're testing against a system that real content-editors are using too.