Watir stands for web application testing in Ruby
and was developed as an open source that would provide Ruby libraries by Paul
Rogers and Bret Pettichord. The software is licensed under BSD and contains all
ruby libraries that would be required for the automation of the web browsers. The
software is known to drive a number of web browsers namely:
- Internet
explorer
- Mozilla
firefox
- Chrome
- Opera
- Safari
The software has been made available especially for
ruby as the ruby gems. Watir is comprised of several smaller projects which
define its functionality:
1.Watir
– Classic: Ruby has got built – in OLE capabilities that can be used by watir
classic for driving the IE pro grammatically. The way of operation of watir
classic is different than that of the other HTTP based testing tools.
2.Watirspec: This one is watir’s executable specification.
3.Watir–web driver: The reference implementation of the web-driver specification
is the selenium 2.0. the roots of the watir web driver can be traced to
the HTML specification.
This automated test tool uses Ruby as the scripting
language for driving the above mentioned web browsers. You can call it a tool
kit for developing effective automated tests and run them against the browsers.
Watir can be used for driving the web applications which can be looked up as
HTML pages while browsing.
However, Watir is not known to work with the
following:
- Active
X plug – in components
- Java
applets
- Macromedia
flash and other plug – in applications.
Before you use Watir for your application you need
to determine whether it will work for it or not. To do so just right click on
the object and check for the view source menu. If the HTML source for the
object is available it can be well automated using watir otherwise not. There
are certain prerequisites for using Watir which are that you need to have
knowledge about the following:
- HTML
- Programming
basics including simple control structures.
- Ruby:
this is required if you put watir to a really good use.
Watir works well for all the windows platforms
including Windows 2000, server 2003, XP and vista and it can be run on versions
6 and 7 of internet explorer. Using ruby 1.8.5 – 24 or 1.8.6 – 26 is
recommended. For installing ruby and watir you need to log on as the
administrator.
There are two ways for installing Watir:
- From
behind a proxy and
- From
behind a firewall
The tests written using Watir are quite easy to
read as well as maintain and exhibit simplicity and flexibility. The way Watir
drives the web browsers is the same as done by people. It performs clicking
operations such as clicking on links and buttons, forms filling operations and
so on. Results are also checked by Watir.
Ruby, like other programming
languages provides your application with the ability to do the following:
- To
connect to data bases
- To
read from spreadsheets and data files
- To
export the XML files
- To
restructure your code so that it can be converted in to a reusable
library.
Watir is free open source tool and therefore no
money expenditure in using it. Ruby is a full featured modern programming
language which lets Watir support all the web applications no matter by what
technology it has been developed. Watir provides support to a number of
browsers on different platforms. Though the tool is quite powerful it is
extremely simple and easy to use. For using Watir it is recommended that you
install the IE developer tool bar.
No comments:
Post a Comment