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

Introducing Testing-as-a-Service (TaaS)

The 'Cloud Computing' technology has revolutionized the IT industry and it has something good to offer to the testing industry too. After Iaas, PaaS,...

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...

Getting Started with Selenium WebDriver

Table of Contents 1. Selenium and Selenium Web Driver 2. Setting-Up the Environment 3. Test Script with Selenium Web Driver 3.1) Creating a project 3.2) Creating...

Â

MORE IN THIS CATEGORY

How To Do API Testing with JMeter

Introduction Application Programming Interface is a very popular term among developers. It is simply a request provider that responds to your request. In other words,...

Getting Started with Selenium WebDriver

Table of Contents 1. Selenium and Selenium Web Driver 2. Setting-Up the Environment 3. Test Script with Selenium Web Driver 3.1) Creating a project 3.2) Creating...

Introducing Testing-as-a-Service (TaaS)

The 'Cloud Computing' technology has revolutionized the IT industry and it has something good to offer to the testing industry too. After Iaas, PaaS,...

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