Install Watir
Select the platform for which you are installing Watir:
| Installing from behind a proxy If you are installing from behind a proxy, be sure to add the following to the end of any gem install or gem update command:
-p http://your-proxy-server-name:your-proxy-server-port
For example, if your proxy server was named proxy and it accepted connections on port 8000, your addition to the command line would be
-p http://proxy:8000
Read the gem install documentation for more information on specifying the proxy. |
Windows
Watir supports Internet Explorer 5.5, 6 and 7 on Windows 2000, XP, Server 2003 and Vista. Watir also supports Firefox 2 and 3.
- Make sure you are logged in as administrator.
- Open command prompt and type:
gem update --system gem install watir
- Beginning with Watir 1.6.0 (Oct 2008), this installs drivers for both
IE and Firefox (FireWatir). Output should be something like this:C:\Documents and Settings\Administrator\>gem install watir Successfully installed watir-1.5.x Installing ri documentation for watir-1.5.x... Installing RDoc documentation for watir-1.5.x...
- Watir's support for Firefox also requires a plugin.
FireWatir Installation#InstalltheJSSHFirefoxExtension
You don't have to download the gem first. Ruby's gem system will automatically find it on the web, download it and install it. Watir's gem includes libraries, and the rdoc. It is convenient for setting up a new machine to run Watir scripts that you've already developed.
| The "gem update --system" command will update the gem system itself. This is required to install Watir gems beginning with Watir 1.5.4 (April 2008). If you have any issues updating the rubygems system, you should update it manually before updating the watir gem. Details can be found on the FAQ Page |
Mac
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.
FireWatir Installation#InstalltheJSSHFirefoxExtension
Linux
To solve Ubuntu 8.10 gem hassle:
http://intertwingly.net/blog/2008/11/23/RubyGems-1-3-1-on-Ubuntu-8-10
Type these commands at a command prompt:
sudo gem update --system sudo gem install firewatir
Watir's support for Firefox also requires a plugin.
FireWatir Installation#InstalltheJSSHFirefoxExtension
| When you install Watir, you may get an error building the documentation for the Builder gem. You can safely ignore this error. |
| Quick Start Guide
Continue at Run Unit Tests. |
Comments (9)
Nov 06, 2008
Bret Pettichord says:
Need to add notes about how to install watir when you are behind a firewall. -p ...Need to add notes about how to install watir when you are behind a firewall. -p switch.
Nov 06, 2008
Bret Pettichord says:
Considering whether this page is about installing Watir on Windows, or whether i...Considering whether this page is about installing Watir on Windows, or whether it needs a section for each OS (now that FireWatir has been adopted into the family).
Feb 22, 2009
Robert Papesch says:
If your browser connects to the web via a PAC script, the host/port can be found...If your browser connects to the web via a PAC script, the host/port can be found within the script source code. A website URL is specified under "Automatic proxy configuration URL" (FF) or "Automatic configuration script" (IE) in the browser network settings. Navigate to that URL and "view source" -- proxy names/ports will be specified within the script.
Feb 19, 2009
Jake Enholm says:
It's great that you guys did all this work for this product. As noted above, how...It's great that you guys did all this work for this product. As noted above, however the proxy issue nullifies the tutorial for most developers. You might want to point them in the direction of the windows executable version at http://rubyforge.org/frs/?group_id=104
Feb 24, 2009
Robert Papesch says:
NOTE: The standalone installer at the above link is over 3 years old (watir-1.4....NOTE: The standalone installer at the above link is over 3 years old (watir-1.4.1.exe dated August 2005). Another old standalone version (watir version 1.5.2) is available here, seems to work OK.
But the best option is the CURRENT release – watir-1.6.2 (as of Feb 2009).
Feb 25, 2009
dennisi says:
sudo gem update --system ERROR: While executing gem ... (RuntimeError)...sudo gem update --system
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.
That's the error I get, which I find is weird because I'm running Ubuntu, not Debian. Can anyone help me out?
Mar 13, 2009
Bardi Einarsson says:
To solve Ubuntu 8.10 gem hassle: http://intertwingly.net/blog/2008/11/23/RubyGem...To solve Ubuntu 8.10 gem hassle: http://intertwingly.net/blog/2008/11/23/RubyGems-1-3-1-on-Ubuntu-8-10
Mar 31, 2009
Jared Quinert says:
This got me through the gem firewall issues: http://exceptionz.wordpress.com/20...This got me through the gem firewall issues:
http://exceptionz.wordpress.com/2008/03/18/run-gem-install-behind-a-firewall-in-windows/
Dec 15
Alex Chaffee says:
On the Mac, I also needed to sudo gem install rb-appscript to fix a "Load erro...On the Mac, I also needed to
sudo gem install rb-appscript
to fix a "Load error: no such file to load – appscript" error.