this is forked from ^_^ https://github.com/google/xpaf
this extension give you good xpath,not /html/div/div/div….etc (such as: //div[@prop=’positionName’ and ‘职位名称 ‘]//input)
XPath Helper makes it easy to extract, edit, and evaluate XPath queries on any webpage.
IMPORTANT: After installing this extension, you must reload any existing tabs or restart Chrome for the extension to work.
Instructions:
1. Open a new tab and navigate to any webpage.
2. Hit Ctrl-Shift-X (or Command-Shift-X on OS X), or click the XPath Helper button in the toolbar, to open the XPath Helper console.
3. Hold down Shift as you mouse over elements on the page. The query box will continuously update to show the XPath query for the element below the mouse pointer, and the results box will show the results for the current query.
4. If desired, edit the XPath query directly in the console. The results box will immediately reflect your changes.
5. Repeat step (2) to close the console.
If the console gets in your way, hold down Shift and then move your mouse over it; it will move to the opposite side of the page.
One word of caution: When rendering HTML tables, Chrome inserts artificial
tags into the DOM, which will consequently show up in queries extracted by this extension.change log:
fix xpath return [null]
插件下载
本站是纯浏览器插件技术分享网站,请用户遵守相关法律法规,抵制不良信息,如发现违规内容请立刻联系删除!
Extract, edit, and evaluate XPath queries with ease. this fork from https://github.com/google/xpaf