如何在 Chrome 中获取 CSS 选择器? [英] How can I get the CSS Selector in Chrome?
问题描述
我希望能够选择/突出显示页面上的元素并找到它的选择器,如下所示:
I want to be able to select/highlight an element on the page and find its selector like this:
div.firstRowdiv.priceAvail>div>div.PriceCompare>div.BodyS
div.firstRow div.priceAvail>div>div.PriceCompare>div.BodyS
我知道您可以在执行检查元素后看到底部的选择,但是如何将此路径复制到剪贴板?在 Firebug 中,我认为您可以执行此操作,但没有看到使用 Chrome 开发人员工具执行此操作的方法,并且搜索扩展程序没有出现任何结果.
I know you can see the selection on the bottom after doing an inspect element, but how can I copy this path to the clipboard? In Firebug I think you can do this, but don't see a way to do this using the Chrome Developer Tools and search for an extension did not turn-up anything.
这是我想要做的更多参考:http://asciicasts.com/episodes/173-screen-scraping-with-scrapi
This is what I am trying to do for more reference: http://asciicasts.com/episodes/173-screen-scraping-with-scrapi
推荐答案
虽然不是扩展,但我确实找到了一个名为 Selector Gadget 这正是我想要的.
Although not an extension, I did find a bookmarklet called Selector Gadget that does exactly what I was looking for.
这篇关于如何在 Chrome 中获取 CSS 选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!