Ryan Schuetzler

Researcher and techie extraordinaire

QA Tool Review: Watij

| Comments


Watij (pronounced wattage) stands for Web Application Testing in Java. Watij is a pure Java API created to allow for the automation of web applications. Based on the simplicity of Watir and enhanced by the power of Java, Watij automates functional testing of web applications through a real browser. Currently Watij supports automating Internet Explorer on Windows only. Future plans are in place to support others like Mozilla.



  • Automatically waits for new pages to load


  • No record function to record/playback test scripts
  • No support for drag/drop in websites
  • IE-only


Free! And open source!

Ease of Use

Ease of Installation

Maybe it’s just because I was using 64-bit Windows 7, but I had all kinds of problems getting Watij to start working. At first the files that were supposed to be copied by the beanshell bat file didn’t copy. Then it turned out that none of it worked in 64-bit Java, so I had to install 32-bit Java and Eclipse. Then opening the Beanshell window and entering the example script from the Watij website didn’t work.

Finally, after removing 64-bit Java and Eclipse and installing 32-bit in its place, it worked.

Setting up a Test

Setting up simple tests is a fairly easy process. The following is an example of a simple test that opens a Google page, enters text, and clicks the search button. Obviously you have to have all the necessary dependencies added to your project:

import static watij.finders.SymbolFactory.; import static org.junit.Assert.; import watij.runtime.ie.*; public class Tests { IE ie = new IE(); ie.textField(name, “q”).set(“Watij”); ie.button(name, “btnG”).click(); assertTrue(ie.containsText(“Web Application Testing in Java”)); }

Running a Test

Once you have a test set up in JUnit or TestNG, running it is easy. Just run it.

Technical Knowledge Needed

You have to be able to figure things out from the user guide, because beyond that, there is no documentation. The programming of tests doesn’t require a lot of skill.


Recording a test

Not possible. All tests must be coded by hand.


All of the testing is done with custom scripts. There is no recorder or GUI available.


The reporting is done using the testing framework. Watij was designed to be used with JUnit, but can also be used with TestNG (or others, I suppose).

Browser Support

Watij is currently only compatible with Internet Explorer.

Data Functions

Since all the tests are run using Java (or BeanShell, supposedly; I couldn’t get it to work), you can do anything that Java can do. That includes pulling data from CSV files, iteration, and conditions.


In all honesty, the documentation for Watij is scant. There is a decent user guide to provide a simple getting started tutorial. There is also an API, but there is no documentation there besides the default stuff generated by IntelliJ. Any search that I did for support with problems I had turned up pretty fruitless. Even the Google Group dedicated to Watij (link) has very little information about anything.

User Interface



  • Watij automatically detects when a page has loaded successfully. Unfortunately this sometimes doesn’t work. Specifically, Watij never recognized that the Intranet home page loaded successfully. This may be an issue for other pages as well.

Project Info


Watij came to be because there were Java people who wanted to run tests like those possible in Watir without having to learn Ruby. There isn’t much information available on when the project started, or even who is running it.

Frequency of Releases

The most recent version of Watij (3.2.1) was released in Jan, 2008. It appears to be an even-years-only project, since extensive work was done on the 1.1, 2.x & 3.1.x versions in 2006, then a little work was done in 2008 for version 3.2.x. Perhaps in 2010 we can look forward to more updates.

Active Forums

Official Forums

Company URL