WATIR stands for "Web Application Testing in Ruby". Watir is a toolkit used to automate browser-based tests during web application development. This automated test tool uses the Ruby scripting language to drive the Internet Explorer web browser, and is available as a Ruby Gem. It can be used to test all types of web applications (ASP, .Net, JSP, PHP, Rails,etc.).
Watir Features:
- Open-source Framework for browser-based automated testing
- Test scripts are written in the Ruby programming language and Watir is a Ruby library that simulates user action in the browsers.
- It supports all major browsers (Internet Explorer 6.0 and above and Firefox 2.0 and above versions)
- Ideal for smoke and Regression testing (Automated test cases which we need to execute repeatedly)
- Ability to use the full power of Ruby in test scripts (Ruby is pure OOPs based language and it has the power to read the data from Excel files and write the data to Excel files, XML files.)
- Running Automated test cases helps to achieve good test coverage
Watir is a family of Ruby libraries but it supports all app no matter what technology it is developed in. They support Internet Explorer on Windows, Firefox on Windows, Mac and Linux, Safari on Mac, Chrome on Windows and Flash testing with Firefox. Like other programming languages, Ruby gives the power to connect to databases, read data files and spreadsheets, export XML, and structure your code as reusable libraries.
Watir makes use of the fact that Ruby has built in OLE capabilities. As such it is possible to drive the Microsoft Internet Explorer browser programmatically. Watir operates differently than HTTP based test tools, which operate by simulating a browser. Instead Watir directly drives the browser through the Object Linking and Embedding protocol, which is implemented over the Component Object Model (COM) architecture.