About Watir
- Web application testing in Ruby often known
as ‘watir’ belongs to the family of the open source family of tools
for automation of the web browsers.
- This tool is available under BSD license
and consists of ruby libraries that can be used for automating the web
browsers.
- The tool possesses the ability for driving the web browsers such as
Mozilla firefox, internet explorer, opera, safari and chrome.
- Further, watir has
been even made available in the form of RubyGems gem.
- The credit for the
primary development of this tool goes to Brett Pettichord and his colleague
Paul Rogers.
Functionality of Watir
- The functionality of watir has been divided
in to three main smaller projects.
- Actually, watir consists of a number of smaller
projects but we shall discuss the 3 major ones namely:
- Watir – classic
- Watir –
webdriver
- Watirspec
About Water–classic
- This project of watir is
based on the fact that the OLE (i.e., object linking and embedding)
capabilities come in – built with the ruby package.
- With such capabilities it
becomes easy for watir–classic to drive the browsers pro-grammatically.
- One
thing to be noted about the water – classic is that its way of operation is
quite different from the way the other HTTP based test tools operate.
- The other
HTTP based testing tools operate via the simulation of the browsers.
- The web
browsers are directly driven by the water – classic using the OLE protocol.
- The
implementation of this protocol is done over the COM (component object model) architecture.
- Inter-process communication is possible due to COM such as in IE and ruby.
- Further, dynamic object creation as well as manipulation is also possible with such architecture.
- This is termed as OLE automation by Microsoft.
- The manipulating program has
been termed as the automation controller.
- Technically this can be explained as
follows: The internet explorer serves as the server and caters to the
automation objects and exposes their methods. The ruby program then serves as
the client that carries out the manipulation of the automation objects. Water –
classic can be put in to the gemfile or can be installed manually.
About Water–webdriver
- This project has been
developed as a modern version of selenium based water API.
- The selenium 2.0 has
been taken to be the reference implementation of the specification of the
webdriver.
- Selenium 2.0 is the selenium webdriver.
- Water API has been
implemented as a wrapper around the selenium webdriver by Jari Bakken.
- The
selenium 2.0 is what from which the water – webdriver has been derived and has
been built up on the html specifications.
- This implies that the water webdriver
always maintain compatibility with the world wide web consortium specifications
that already exist.
- Webdriver is quite an elegant way for using webdriver with
ruby.
- Ruby 1.9.3 is perfectly supported by the watir –
webdriver but nonetheless it works well with its old versions also.
- When you
start with watir ruby will take your commands and the spath selectors are
absent here.
- Even though the xpath selectors are supported by watir, its API is
so awesome that the need for using the xpaths is totally eliminated.
- Using
watir web driver increases your efficiency as well as productivity.
- In addition
to this, the quality of the scripts execution increases by a thousand times.
About Watirspec
- This is the third major project of watir and can be considered to be its API’s
executable specification such as ruby has rubyspec.
- The performance of watir is
better with watirspec and also improves the compliance with the watir –
webdriver.
No comments:
Post a Comment