Installation
Watir is a family of drivers for different browsers running on several operating systems. This page provides an overview of how to install the leading drivers on several operating systems, and also how to install a HTML Inspector.
Windows
Install Ruby
Install Ruby using the one-click installer for Windows. We recommend using Ruby 1.8.6-26 with Watir 1.6. More details.
Watir drivers are packaged as gems, Ruby libraries that can be installed over the internet.
Install Watir
Type these commands at a command prompt:
gem update --system
gem install watir
This installs drivers for both IE and Firefox (FireWatir).
Watir’s support for Firefox also requires a plugin.
If you run into trouble or are installing from behind a firewall, please see additional notes.
Mac
Check you have Ruby
Ruby is probably already installed on your machine. You can verify which version of Ruby is install by typing this command in a terminal window:
ruby -v
We recommend using Ruby 1.8.6 on all platforms.
Install Watir
Type these commands at a command prompt:
sudo gem update --system
sudo gem install firewatir
sudo gem install safariwatir
Watir’s support for Firefox also requires a plugin.
If you run into trouble or are installing from behind a firewall, please see additional notes.
Linux
Check you have Ruby
Ruby is probably already installed on your machine. You can verify which version of Ruby is install by typing this command in a terminal window:
ruby -v
We recommend using Ruby 1.8.6 on all platforms.
Install Watir
Type these commands at a command prompt:
sudo gem update --system
sudo gem install firewatir
Watir’s support for Firefox also requires a plugin.
If you run into trouble or are installing from behind a firewall, please see additional notes.
Install an HTML inspector
To use Watir effectively, you’ll need to be able to browse through the structure of your application’s HTML pages. These tools help you do that.
- On Firefox, use Firebug
- On Internet Explorer, use the IE Developer Toolbar









thank you it helps alot for me while learning watir…
fantastic tool for automation, i just loved it. thanks a lot
These commands require the command prompt to be run as Administrator in Windows 7:
gem update –system
gem install watir
A small adjustement to install process :
With Ruby 1.8.6, you have ruby gems 0.9.4, so “gem update –system” doesn’t work, you have to type “gem update”.
Thanks. You should update to the latest version of rubygems to work with the latest version of Watir: http://tinyurl.com/yg6wgsf
By the way, my advice is not a good one : “gem update” doesn’t make any error, but it doesn’t update to the latest version of rubygems either…
It looks like manual update of RubyGems (manual download + “ruby setup”) is the only way to get Watir on Windows with this 1.8.26 OneClick version.
Hi there,
I can’t update watir 1.5 ar 1.6,
I using Ruby
C:\Documents and Settings\Administrator>ruby -v
ruby 1.8.6 [i368-mswin32]
and watir 1.4.1
C:\Documents and Settings\Administrator>gem update –system
Updating RubyGems…
Attempting remote update of rubygems-update
Install required dependency builder? [Yn] Y
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find builder (>= 0) in any repository
Thanks,
Please find the answer to this problem on the Watir Wiki FAQ: http://tinyurl.com/yg6wgsf
To install devkit first, here is a reference, hope it helps
http://stackoverflow.com/questions/1718500/installing-hpricot-on-ruby-1-9-1-on-windows