This is my short response on an interesting post to the watir-general mailing list.
The aha moment from the Selenium meetup in February was that we’re both solving the same problems albeit with some variations. In the open source functional testing area, there are two tools that reign in the top tier for web application testing – Watir and Selenium.
On Sun, Jun 22, 2008 at 11:29 AM, aidy wrote:
Hi,
I asked Jason Huggins (the Selenium inventor) what he considered the
differences to be between Selenium and Firewatir\Watir: Below is his
reply.
Aidy
———- Forwarded message ———-
….
Jason Huggins has left a new comment on the post “Selenium’s Inventor”:
Regarding Firewatir\Watir vs Selenium — Selenium supports more
languages (Ruby, Perl, Python, Java, C#, PHP, and a FIT-inspired HTML
syntax for simple cases) while Firewatir\Watir only supports Ruby.
Selenium does have multiple language support, which has worked well in some cases. One of the top functional automation testers I worked with is now at Oracle consumed BEA, and does some great work for their functional testing team in Java.
There may be benefits to programming in the same language as your developers: easier reuse of objects and code, closer tie ins to the system under test, speaking the same language (literally) and if you’re a developer testing your own code then you don’t have to learn a new programming language.
In practice, I’ve seen that of dubious value. The QA field is, in my opinion, undergoing a change towards being test developers with a much more technical . This isn’t meant to undermine the importance of base QA skills and exploratory testing as part of the process, but there are some caveats.
Why Ruby?
I’ve found Ruby to be the best language to introduce people new to programming concepts, having done that now for several years and has been simple for our Java developers to get started with, teaching a quick crash course – 4hours over 2 days.
As we’ve moved more into a Service oriented architecture, we’ve levaraged Soap4r, to populate data, retrieve data, and test as an api. Using Ruby as the client instead of the Java with the same libraries we’re using internally has lead us to several bugs that we wouldn’t have found otherwise.
Extending Selenium means understanding the pieces, extending Javascript or the base java implementation. Adding more features onto Watir, means opening up the class – IE or container, or whatever, and extending or replacing it with your own features.
External DSLs can be easily created using most programming languages, Internal DSLs can’t easily be written using every language but are very simple to create in Ruby. This simplifies our test code, making the underlying code accessible but opaque to most test writers.
The html FIT style tables that Selenium uses, may have initial success, but will lead into hard to maintain and challenging to extend tests. I haven’t used that style of test writing extensively, but I find it limiting in some cases and don’t care for it much, it would be trivial to implement a similar framework and use Watir as the driver.
Ruby is cool
Same thing happened to Java 10+ years ago, it was a language dismissed by a lot of programmers, that had a long road to map out. J2EE now has a huge feature set though it’s become horribly complicated and challenging to understand.
It sounds like a trivial issue, but Ruby’s status as the “it” language and it’s relative simplicity have made it a great language to use for both less technical testers and generated a lot of interest from our developers.
Some people prefer Watir’s object oriented API style over Selenium’s
functional/procedural style. Selenium’s API feels a bit more simple
for simple cases. Some people (even I!) would argue that Watir’s API
is more elegant and polished than Selenium’s. But I think this is a
matter of preference, and not a critical difference in either case.
API example:
Watir:
browser.button(:id,’submit’).click
Selenium:
browser.click(‘id=submit’)
Watir’s API has been a good reason for it’s success and has spawned several implementations. The above example is pretty trivial. Watir has always taken pains to consider it’s core audience – QA engineers – leading to other design differences between the two projects. Internally waiting for the browser to finish, for example. Selenium, in my opinion, is more geared towards developers as the primary end users.
Also, Selenium’s IDE for Firefox is very simple to use for newcomers,
while Selenium RC and Grid “scales up” and provides more sophisticated
features to parallelize test runs over many machines.
Selenium’s IDE is certainly the most popular project in the Selenium family. There are are debates around record/playback tools, so I won’t rehash those here. Popularity itself and leading testers to the project, might in and of itself be justification. It is one of the more lightweight interesting tools I’ve seen in that area.
Grid is a great feature to have, both Watir and Selenium have additional products coming out contributing to a family of tools, built on or around the base frameworks. It’s been fun to see the developments in the past few years on both projects.
Setting up Selenium is a pain in the neck: the website is not so good and hard to figure out what to download. There are still major challenges if you want to run sites on SSL. Getting started writing tests in Watir is simple process, in the Watir class that Bret Pettichord and I taught last year at Agile 2007, testers of varying skill levels were writing code within the first hour.
These issues were deal breakers for me: Selenium offers no suport for browser generated dialogs and modal_dialogs in ie. The secure support is unreliable as best through ssl and proxy support for external sites is weak.
Traditionally, Watir has been an IE-only tool, but that is changing
with better FireWatir integration. Meanwhile, Selenium has had better
support for Firefox, but lacked some of Watir’s features for testing
IE. Over time, I expect the cross-browser differences between Selenium
and Watir to converge capability-wise. But at the moment, Watir is a
better tool for IE, and Selenium is a better tool for Firefox. Both
tools have many “opportunities for improvement” for testing Safari.
Selenium seems to be headed into the browser plugin space to solve the difficulties in at least SSL issues cross site scripting and other frame related issues. Both projects have come a long way since I initially scoped them out almost 3 years ago and still remain at the top of the pack for web automation.
There are uses for both tools and each has their strength. There’s a lot I find interesting in Selenium and have found that, given we’re in the same testing space, there’s a lot to learn from each other as we discover and solve many of the same issues in sometimes similar ways. In no means do I intend this as a Selenium flogging,

I’d use Selenium if I found it the approriate tool to use for the job and may leverage parts of it in the future.