Mozilla Firefox安装Firepath Firebug找xpath最新可用的方法附老版本Firefox下载链接
Mozilla Firefox
這個是有版本要求的,可以從Firepath安裝的時候看到,要求Firefox版本3.5-6.0 ?所以呢,你要裝一個老版本的Firefox,這里給你準備好了
With FirePath you can: * Edit XPath expressions, CSS3 selectors and JQuery selectors (Sizzle selector engine) with auto completion for XPath (using TAB or up and down arrows). * Evaluate the expression/selector on any HTML or XML documents. * Display the result of evaluations in a Firebug-like DOM tree. * Highlight the results directly on the document displayed by Firefox (works only with HTML documents). * Generate an XPath expression or a CSS selector for an element by right clicking on it and selecting "Inspect in FirePath" in the context menu. * Define the evaluation context (parent) of an expression/selector. * Choose the document in which to evaluate the expression/selector (only applicable for HTML documents with frames or iframes).FirePath 0.9.7 requires Firefox 3.5 to 6.0 and Firebug 1.4 to 1.8.* Note that the XPath auto completion does not work with Firebug 1.6 and higher?
Firebug
這個插件大家一定不陌生,可以用了干很多事情,比如調試JavaScript等等。?
還有一個作用就是定位頁面元素,這樣你可以清晰的看到某個元素的id,class等等?
- 從https://addons.mozilla.org/en-US/firefox/addon/firebug/里找到你的firefox瀏覽器對應的firebug的版本?
-?https://getfirebug.com/downloads,下載并安裝?
- 安裝完后,你的firefox瀏覽器會有這個圖標
?
Firepath
安裝
使用教程:
通過firebug+firepath可以得到元素的xpath和css path。
1. 得到xpath
1.1 打開firebug窗口
1.2 然后選擇要查看xpath的頁面元素,xpath就會顯示在firebug窗口,如下圖?
下面給你們演示一下我的安裝成功后可使用圖片
以 www.baidu.com為例
?
點擊一下,然后點擊一下要找的元素,即可看到定位,然后FirePath隨著也出現了。
這種方法可以得到元素的相對xpath,如果想得到元素的絕對xpath,在FirePath旁邊的小三角選擇Generate Absolute xpath.??
2. 得到css path
方法和得到xpath一樣,選擇css就行,如下圖所示?
ok,基本介紹完了,看完請點個贊呀?
總結
以上是生活随笔為你收集整理的Mozilla Firefox安装Firepath Firebug找xpath最新可用的方法附老版本Firefox下载链接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自动化测试辅助工具——FirePath
- 下一篇: 如何使用Firepath工具方法定位元素