Watir vs. Selenium

参考:http://www.newsqa.com/watir-vs-selenium/

 

Watir本质上就是封装了IE COM接口的Ruby库。

Watir is a Ruby library that wraps the COM interface to Internet Explorer. COM is a long-standing Windows-based technology for making libraries accessible to various languages. This allows access to the Document Object Model (DOM) so it doesn’t matter where on the page an object exists, what matters is how you identify it (id, name, title, etc).

 

Selenium驱动浏览器的方式与Watir不一样,Selenium的自动化引擎是用JavaScript写的,并且运行在浏览器内。

Selenium uses a unique mechanism for driving browsers. Selenium’s automation engine is written in JavaScript and runs inside a browser. The engine, called a browser bot, is embedded in a page that accesses the application under test in a separate frame. Because of cross-site scripting, Selenium’s browser bot has to be served from the same site as the application under test – requiring installation on the server.

 

Selenium支持命令语言,称为“Selenese”。

Selenium supports a command language, called Selenese. Tests can be embedded in an HTML table, which will be read in by the browser bot and then executed.

 

WatirSelenium都是直接在浏览器中执行测试,并且可以在浏览器最小化的状态下运行。

Both tools run tests directly in a browser, and both do it in a way that allows the browser to be minimized while the tests are running, which means you don’t have to dedicate a machine to running tests.

 

Watir采用Ruby语言,容易学习,起先仅支持IE,现在支持FF、Safari

Watir only supports IE. These variations of Watir support other browsers.

 

Watir was designed to be easy to learn, it allows page elements to be identified by index, name, ID, value or adjacent text. Complaint: Watir is currently limited to IE browsers on Windows. There are efforts underway to support Firefox in the future.

 

Selenium一开始就设计成支持多浏览器和多平台。Selenium需要服务器端安装。

Selenium was designed for breadth of coverage- multiple browsers and platforms. It was expected to be used by the same developers who built the application. Complaint: Selenium requires a server-side installation.

 

Selenium支持多种编程语言。

You can also express Selenium tests in a programming language, taking advantage of language-specific drivers that communicate in Selenese to the browser bot.

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值