Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Live xpath search in your browser

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?

like image 899
digiarnie Avatar asked Feb 10 '09 23:02

digiarnie


People also ask

How do I set XPath automatically in Chrome?

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.

How do I query XPath in Chrome?

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.

What is XPath in browser?

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.


1 Answers

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.

like image 58
Shog9 Avatar answered Nov 15 '22 09:11

Shog9