有没有办法在google chrome中获取xpath? [英] Is there a way to get the xpath in google chrome?
本文介绍了有没有办法在google chrome中获取xpath?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个我想用YQL的网页。但是我需要特定项目的xpath。我可以在谷歌浏览器的调试工具区看到它,但我没有看到复制该xpath的方法。
有没有办法复制完整的xpath或你可以使用 $ x
来做一个扩展吗?
解决方案 Chrome的JavaScript控制台。
例如: $ x(// img)
此外,网络检查器中的搜索框将接受xpath
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 or an extension to do it?
解决方案
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
这篇关于有没有办法在google chrome中获取xpath?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文