A Brief Review Of WATIR

An open source Ruby library for automating web application tests

WATIR stands for ‘Web Testing Application in Ruby‘. It is an OLE-based testing application that automates your browser using Ruby libraries. Here are some of the pros and cons of Watir in brief at first glance.

Functionality of Watir

Watir takes advantage of the built-in OLE capabilities of Ruby to automate browsers. Normally, HTTP-based tools create a browser simulator for a web-based testing system. Watir works in a different way wherein it takes the browser through the OLE protocol. By implementing the OLE protocol over Component Object Model (COM) architecture, Watir facilitates inter-process communication between the browser and Ruby. Dynamic object creation and manipulation is made possible as well.

For Internet Explorer, this process is called OLE Automation. The program that manipulates objects is called the automation controller. The automation objects are served by the Internet Explorer which is why it is called as the server. On the other hand, the Ruby program acts as a client to manipulate objects.

WATIR Advantages

  • Uses the Ruby library to facilitate OLE-based testing. This approach eliminates the need for an external server.
  • Supports multi browsers and OS. You can write tests for new browsers as well.
  • Offers a rich and intuitive interface. Easy to create code without requiring extensive documentation.
  • One of the important features of WATIR is its ability to wait for the page to load. It detects when the page finishes loading. Moreover, tests run faster and are stable when compared with Selenium or Sahi.
  • Another important feature is the Attach Method. You can programmatically attach the original domain window and the linked domain window. For instance, you use Facebook to login to an application. The login page of your application will load the Facebook domain. With other tools like Selenium, the actual application loses connection when the linked domain is opened and the application gets locked. However, WATIR lets you attach both domains so that you access the linked window and the original window from the same test.

WATIR Disadvantage

  • Limited support to handle Popups. JavaScript generated popups such as Alert boxes, Windows Security popups, and other popups that are not contained in a web browser are not accessible the same way as the HTML pages are. There has been some experimental code packaged with Watir to deal with popups with limited success. A good popup handling solution is being worked on and will be included in a future Watir release.
  • AUT Object repository/definitions are not available within the WATIR. Third-party tools such as MS Web Developer Toolbar have to be employed but have limited capabilities and usability.
  • No Real-time Debugging options or debugger.
  • Works only for Web-based application, does not has the capability to automate non web-based applications.
  • There is no recording mode or any such mode to generate scripts automatically. Scripts have to be written manually.
  • While WATIR supports multiple browsers, you have to use a different library for each browser. You have to learn Ruby as well.
Tushar Sharma
Tushar Sharmahttps://www.automationdojos.com
Hi! This is Tushar, the author of 'Automation Dojos'. A passionate IT professional with a big appetite for learning, I enjoy technical content creation and curation. Hope you are having a good time! Don't forget to subscribe and stay in touch. Wishing you happy learning!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

RELATED POSTS

Working with Selenium WebElements

Table of Contents 1. Selenium WebElements 2. WebElement Locators 3. Working With Text Box 4. Working With Buttons 5. Checkboxes and Radio Buttons 6....

How To Use TestNG with Selenium

1. What is TestNG? TestNG is an open-source automated testing framework with flexible and powerful features. It is inspired by JUnit and NUnit but with...

Review of Test Design Studio 2.0

While QTP offers greater flexibility to automate testing procedures, the IDE lacks certain professional features. A QTP license is expensive as well. Test Design...

Â

MORE IN THIS CATEGORY

Common Errors with QTP/UFT – Part 1

As the name suggests, this article focuses on the common problems faced during or after QTP/UFT installation. We shall also have a separate article...

Essentials of Typical QTP/UFT Framework

Table of Contents Essentials 1: Test Artefacts Repository Essentials 2: Error Handling and Recovery Essentials 3: Object Identification Method Essentials 4: Test Data Management Essentials 5: Result and...

Anti Malware File For Testing System Security

With ever-growing malware, it is inevitable to protect your system with the right anti-virus solution. However, you have to constantly monitor the performance of...

RECENT 'HOW-TO'

How To Install Oh-My-Posh On Windows PowerShell

Oh-My-Posh is a powerful custom prompt engine for any shell that has the ability to adjust the prompt string with a function or variable. It does not...

SIMILAR ON CODEX

- Advertisement -spot_img