Is there a tool or browser plugin (not sure if Firebug can do this) that will let you open a web page and then using the tool/plugin to search using an xpath query and it will highlight the things on the screen that match your query?
Step 1: Open a new tab and navigate to the desired webpage. Step 3: Hold down Shift as you mouse over elements on the page. The query box will continuously update to show the XPath query for the element below the mouse pointer, and the results box will show the results for the current query.
Google Chrome Copy XPathRight click the highlighted element > Inspect. This brings up Chrome's DevTools. Right click on the element within DevTools > Copy > Copy XPath. This is the XPath query for your highlighted element, written out node by node.
XPath is a Selenium technique to navigate through a page's HTML structure. It enables testers to navigate through any document's XML structure, which can be used on both HTML and XML documents.
Firebug and Chrome Web Inspector offers the $x()
convenience function, which dumps the results of an xpath query to the console (where they can be hovered over to highlight). Not quite what you want though.
And then there's XPather, which does a whole lot more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With