做一个有知的人!!!

selenium学习1(插件及jar包下载说明)

上一篇 / 下一篇  2015-11-18 21:52:49 / 个人分类:selenium

由于前期有个项目已经有不止4个版本,针对这些版本的测试如果纯人工测试成本较大,而且后续也会有更多个新的升级版出现,所以考虑采用自动化进行测试。

  • 插件下载地址

需要用到的插件(必备辅助工具)及selenium相关的部分jar包的下载地址如下:

selenimu IDE及相关jar包下载地址:

http://seleniumhq.org/download/seleniumIDE其他版本下载地址:http://release.seleniumhq.org/selenium-ide/

firebug下载地址:

https://addons.mozilla.org/zh-CN/firefox/addon/firebug/(或者http://getfirebug.com/releases/firebug/)

firepath(需要firebug才能正常工作)下载地址:

https://addons.mozilla.org/zh-CN/firefox/addon/firepath/

  • firebug和firepath

firebugfirefox的一个插件,可以用来定位页面元素的html标签位置,特别是id是动态的时候。

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.*[注意]-网上说0.9.7firepath支持的firebug的最高版本是1.8.*,但是我使用1.9.2firebug也还是支持的,使用过程中也没有遇到其他的问题。

  Note that the XPath auto completion does not work with Firebug 1.6 and higher

  • 插件安装

由于firebugfirefoxselenium IDE均为firefox的插件,故其安装可以直接通过将下载好的离线插件文件拖动到firefox完成安装,如果没有离线的插件文件也可以直接通过firefox的“附加组件管理器”进行在线下载并完成安装。

本人都是通过下载离线插件文件进行安装的,下载的版本见下一章节。

  • 实施版本说明

    实施可用环境如下(亲测可用):

firefox5.0.1+firebug1.8.3/1.9.2+firepath0.9.7.1.1-signed+selenium IDE 0.25.1-signed。安装后通过“工具”->“附加组件”打开显示下图所示内容说明前期的准备工作已经做好:

  •      其他说明

     其他的需要用到的jar包有(暂时还没有用到):

  说明:在使用selenium IDE调试脚本的时候就会用到firebugfirepath2个插件,用的最多的就是使用firebug定位页面元素,使用firepath获取xpath路径(原生态的firebug不支持按xpath查找元素,在无法使用idname定位元素时可以使用firepath获取xpath路径)。

 

优秀博文推荐:http://blog.sina.com.cn/s/blog_68cb48770100v9c7.htmlseleniumIDE+firebug+seleniumRC


TAG: 网站 Selenium selenium

 

评分:0

我来说两句

Open Toolbar