Friday, April 9, 2010

Watir: Install Watir: How to install Watir?

nstalling 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.
  1. Make sure you are logged in as administrator.
  2. Open command prompt and type:
    gem update --system
    gem install watir
  3. 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...
  4. 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.

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.

2 comments: