ChroPath EN
AutonomIQ · Firefox
ChroPath helps to generate and validate selectors like relative xpath, cssSelector etc with iframe support.
<all_urls>),意味着它可以读取你在任意站点的页面内容,包括已登录的页面。这是许多扩展正常工作的必要条件,但也值得你确认来源可信。
截图
简介
ChroPath helps to generate and validate selectors like relative xpath, cssSelector etc with iframe support.
Very Important for Firefox 70 users: By default you won't be able to type / and ' in ChroPath selector box because of below preference, so please change it.
1. Open Mozilla Firefox and type about:config in the addressbar and press Enter. It'll show you a warning message, click on "I accept the risk!" button.
2. Now paste "accessibility.typeaheadfind.manual" in Search filter box and it'll show following preference in the window:
accessibility.typeaheadfind.manual
3. This preference is set to true by default i.e. enabled. To disable the feature, double-click on accessibility.typeaheadfind.manual preference and change its value to false.
Here is the video for same:
https://www.youtube.com/watch?v=iEamqrmqhHk
ChroPath generates unique relative xpath, absolute xpath, cssSelectors, linkText and partialLinkText just by one click. ChroPath can also be used as Editor for selectors. It makes easy to write, edit, extract, and evaluate XPath queries on any webpage. ChroPath also supports iframe, multi selectors generation, generate relative xpath with custom attribute, automation script steps generation and many more.
Video tutorial- https://youtu.be/NVtb9HN-8Lc
Please contact tools@autonomiq.io for support.
How to use ChroPath-
1. Right-click on the web page, and then click Inspect.
2. In the right side of Elements tab, click on ChroPath tab.
3. To generate selectors, inspect element or click on any DOM node, it will generate the unique relative XPath/absolute XPath/CSS selector/linkText/partialLinkText.
4. To evaluate XPath/CSS, type the XPath/CSS query and press enter key.
As you enter, it will query in DOM for the relevant element/node. You can view the matching node(s) and nodes value as per their sequential occurrence. A green colour outline appears around to highlight the first matching elements and rest in blue colour in the web page.
5. If you mouse hover on any matching node in the ChroPath tab, green/blue dashed outline will convert into dotted orange red to highlight the corresponding element in the webpage.
6. If the found element is not in visible area on webpage then mouse hover on found node in ChroPath panel will scroll that element in the visible area with dotted orange red outline.
7. If found element is not highlighted but visible then on mouse hover on matching node on ChroPath tab it will highlight element with dotted orange red outline.
8. copy the locators just by clicking on copy icon.
9. click on edit icon if want to edit any locator.
Generate Relative xpath with your attribute-
1. Click on setting button which is available in ChroPath tab.
2. In attribute name box, type your attribute value and hit enter.
3. It will generate the relative xpath with the given attribute if that will be unique else it will try with other attribute and text or parent.
4. If given attribute is not there in the node then it will generate the unique relative xpath with some other attribute.
5. Also for few attributes (id, class, name and placeholder) sort cuts have been provided. If you don't want to generate xpath with any of these attribute, just uncheck them.
Generate Automation code-
1. Click on the set driver command icon (+ icon, beside setting icon) in ChroPath tab.
2. Now when you will generate selectors, it will generate selectors with pre-command like driver.findElement(By.xpath('xpathValue')) appended in selectors.
3. You can also change these command. Like FindByXpath('xpathValue'). Just have the keyword 'xpathValue' in your command where you want to replace the selector value.
4. Now just by clicking on copy icon you got full automation step.
5. It will add the pre-command only when this is active, if you don't want to add pre-command click on the plus icon again.
Generate selectors in bulk along with label name-
1. Click on the record button in ChroPath tab.
2. Now here just inspect all the elements or click on DOM node for which you want to generate the selectors.
3. It will generate selector along with label name.
4. You can copy, edit, delete any of the row in table.
5. Label and selectors fields are editable, so you can directly edit them there itself.
6. You can also export all the generated selectors, just by clicking Export icon given in the table header in ChroPath tab.
7. At any point of time if you want to stop recording and go back to default view, just click on record button again. This will not remove your recorded selectors but if you will close the devtool then you will loose them.
8. Also you can stop recording at anytime just by clicking on ON/OFF button.
9. Every time when you will open devtool and then ChroPath, it will be fresh window.
Get selectors and editor both the options in single selector view-
1. If you want to work with any particular selector like Rel XPath only, then change the selectors drop down value to Rel XPath.
2. Here you will get Rel XPath as in separate row like default view and editor box empty to use ChroPath as editor in the same time.
UI features-
1. Now ChroPath gives the colored relative xpath.
2. Delete option in place of delete one by one.
iframe feature-
*Supports only those iframe which has the same src.
1. If element inside iframe, then it will highlight first matching element in orange dotted outline.
2. It will also add one 'if..' icon in input box of ChroPath tab to make it clear that element is inside iframe.
3. If you want to verify your selector inside iframe then 1st inspect any element inside that iframe so that it get the DOM o…
ChroPath 是做什么的
ChroPath 是一款面向 Firefox 的开发者工具类扩展,主要用来调试页面、查看样式与请求、测试接口、辅助前端开发。官方对它的介绍是:ChroPath helps to generate and validate selectors like relative xpath, cssSelector etc with iframe support.在Firefox 附加组件商店(AMO)上,它当前版本 5.1.5,评分 4.33(97 人评价),约 1,562 名用户。
适合什么人用
从功能定位看,ChroPath 更适合前端工程师、测试与需要经常查看页面结构的用户。如果你平时只是偶尔遇到相关需求,用浏览器自带功能也能凑合;但如果这件事每天都发生,装一个专门处理它的扩展通常比手动操作省事得多。需要注意的是它作用于所有网站,装上后建议先观察一两天,确认不影响常用站点的正常使用。
怎么安装 ChroPath
- 打开Firefox 附加组件商店(AMO)上的官方页面;
- 点「添加到浏览器」并确认权限提示;
- 装好后在扩展列表里固定图标,方便随时开关。
本站只做索引与介绍,安装包来自官方商店。如果商店页面提示当前地区不可用,说明该扩展未在你所在区域上架。
常见问题
ChroPath 是免费的吗?
ChroPath 在Firefox 附加组件商店(AMO)免费提供下载。它是浏览器扩展,装上就能直接用,不需要注册账号。
ChroPath 安全吗?
它只申请了 0 项权限,范围比较克制,没有申请「读取所有网站数据」这种大权限。
ChroPath 支持哪些浏览器?
当前收录的版本来自Firefox 附加组件商店(AMO),适用于 Firefox。同一个扩展在其他商店可能有对应版本,但功能与版本号不一定相同。
怎么卸载 ChroPath?
在扩展管理页找到 ChroPath,点移除即可。它在本地保存的设置会一起清掉,不会残留数据。
权限清单 来自 manifest.json 原文
站点访问 1
<all_urls>
接口权限 1
devtools






