Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using XPath in Safari 6 web inspector

Safari's Web Inspector lets you do XPath queries from the search box:

web inspector screenshot

But the box is too small! You can use it but not comfortably.

Is it possible to do the XPath query from the console prompt shown on the bottom of the screenshot?

like image 673
gdelfino Avatar asked Sep 19 '12 13:09

gdelfino


1 Answers

I think in the console of Chrome or Firefox or Safari you can evaluate XPath expressions with the function $x e.g. $x('//span') selects all span elements.

like image 142
Martin Honnen Avatar answered Oct 02 '22 12:10

Martin Honnen