Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get the XPath in Google Chrome?

I have a webpage I want to use with YQL. But I need the XPath of a specific item. I can see it in the debug tools area for Google Chrome but I don't see a way to copy that XPath.

Is there a way to copy a full XPath?

like image 553
GeoffreyF67 Avatar asked Jun 12 '10 23:06

GeoffreyF67


1 Answers

You can use $x in the Chrome javascript console. No extensions needed.

ex: $x("//img")

Also the search box in the web inspector will accept xpath

like image 86
Matt Polito Avatar answered Sep 18 '22 11:09

Matt Polito