Test Automation tools comparison – Selenium vs Sahi vs Watir

Automated software testing tool allows users to automate testing. Testing tool for web applications provides framework for software test developers to develop test cases for testing applications. Testing is achieved by simulating mouse clicks, keyboard entries and other user workflows.


There are lots of tools available commercially as well as open source. To keep my clients’ project cost low, I prefer using open source tools. Generally, open source tools also have large community support compared to the tools with a price tag. Some of the popular test automation tools are selenium, Sahi, tool with Watir webdriver (Cucumber). Below is a comparison between three of my all time favorite tools J


  Selenium Sahi Watir
Browser Works only on Firefox Multi browser
  • Multi browser
Frames and pop-up support Has trouble recording IFrames, Frames and popup windows Can record on IFrames, Frames and popup windows Frames and pop-ups are accessible using API
  For Frames and IFrames, need to explicitly selectFrame Implicit smart identification of elements even across Frames and IFrames Identification can be done via titles or text
  Uses XPath for identification of elements if id or name not present Uses various algorithms to uniquely identify elements in a simple human recognizable way Use simple algorithms – easy to debug
Programming Language support Java, Ruby, Perl, Python, C# (and may be more). Sahi Script, Java, Ruby Sahi Script has the syntax of javascript but can interoperate with any Java code directly from script. The Java/Ruby drivers are available since Sahi V3 Ruby
  Needs language bridges for each new feature. For example, needs java bridge to invoke Flash via ExternalAPI. Sahi Script can directly invoke anything exposed by javascript. Rich API to invoke any function
Ease of use Easy to get started with because of Selenium IDE which is a firefox plugin. Estimated start time less than 5 minutes Relatively steeper learning curve compared to Selenium – it needs installation of Sahi. Estimated start time 10-30 minutes, depending on Java installation etc. Relatively shorter learning cureve – requires Ruby and rubygems
  Deep learning curve to switch from Selenium IDE to Selenium RC. There is only one mode of operation for Sahi. Extremely simple to learn and use for testers Needs Ruby/System programming knowledge to allow distribution of tasks
  Knowledge of programming language required Can achieve most automation with just functions and variables. Sahi has inbuilt APIs for most other complex tasks like data driven testing Knowledge of Ruby programming language required
  Needs JUnit style of programming Can choose your own style Ruby style
  Uses XPath based identification for elements in complex html structures or those with dynamic ids. css selectors and javascript may also be used. Has nearness APIs like _in and _near which can help show nearness of elements. Eg. _image(“delete.gif”, _near(“username 4”)) Built in support for complex functions
  Needs waits for making AJAX work No waits needed in 90% cases No wait needed
  Supports parallel execution Inbuilt parallel execution. Needs only one parameter change Supports parallel execution outside Watir/Ruby