Xpath tools: Difference between revisions
Jump to navigation
Jump to search
m (→references) |
|||
| Line 24: | Line 24: | ||
# 輸入 xpath 規則。就會凸顯符合 xpath 規則的網頁元件地方 | # 輸入 xpath 規則。就會凸顯符合 xpath 規則的網頁元件地方 | ||
== | == References == | ||
* References | |||
<references/> | <references/> | ||
Related articles | |||
* [https://devhints.io/xpath Xpath cheatsheet] | |||
{{Template:Troubleshooting}} | {{Template:Troubleshooting}} | ||
[[Category:Web_Dev]] [[Category:Javascript]] | [[Category:Web_Dev]] [[Category:Javascript]] | ||
Revision as of 14:21, 16 May 2018
Tools for xpath selection
chrome javascript console
- 選單: 工具 -> 開發人員工具 -> Console
- 確認符合 XPath 規則的結果,例如 XPath 規則是 "//img",可在 Console 輸入 $x("//img") ,按 Enter。就會顯示符合 xpath 規則的結果[1]:
image hosted by flickr
chrome extension
- 輸入 ctrl + shift + x 開始 XPath Helper console
- 輸入 xpath 規則。就會凸顯符合 xpath 規則的網頁元件地方
image hosted by flickr
firefox extension
Firebug + FirePath for Firefox
- 選單: 工具 --> 網頁開發者 --> Firebug --> 開啟 Firebug
- 切換到 FirePath 標籤
- 輸入 xpath 規則。就會凸顯符合 xpath 規則的網頁元件地方
References
- References
Related articles
Troubleshooting of ...
- PHP, cUrl, Python, selenium, HTTP status code errors
- Database: SQL syntax debug, MySQL errors, MySQLTuner errors or PostgreSQL errors
- HTML/Javascript: Troubleshooting of javascript, XPath
- Software: Mediawiki, Docker, FTP problems, online conference software
- Test connectivity for the web service, Web Ping, Network problem, Web user behavior, Web scrape troubleshooting
Template