Watir vs Selenium

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

参考: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.

 

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

猜你喜欢

转载自blog.csdn.net/gdhjgfr/article/details/84043930