Installation

For up to date installation instructions download Homebrewer’s Guide to Watir book. You can download the book for free. If you buy the book the money goes to Watir project.

Troubleshooting

Visit the following links for having trouble with installation:

  • Watir FAQ
  • Watir Installation Issues

Installing Behind an Authenticating Proxy

Watir drivers are packaged as gems, Ruby libraries that can be installed over the internet. If installing behind an authenticating proxy, first set the HTTP_PROXY environment variable:

Windows:

set HTTP_PROXY=username:password@your.proxy.com:80

Linux:

export http_proxy=username:password@your.proxy.com:80

Tips

Install Ruby on Linux

Use your relevant package manager to update or install Ruby with the following at a terminal window:

sudo apt-get install ruby  # for Ubuntu / Debian users
sudo yum install ruby      # for Red Hat / Fedora users

Update RubyGems on Linux

Make sure you have the latest rubygems version 1.3.7 or above installed. Use your relevant package manager to install the latest version with the following at a terminal window:

sudo apt-get install rubygems # for Ubuntu / Debian users
sudo yum install rubygems  # for Red Hat / Fedora users

Install a 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

Installing or Updating RubyGems

While updating RubyGems, or installing any of the gems, you can use the following additional flags:

--no-rdoc --no-ri

For example:

gem update --system --no-rdoc --no-ri
gem install watir --no-rdoc --no-ri

It will be much faster, but you will not install RDoc and ri.

Rate this:

Share this:

  • Email
  • Print
  • Twitter
  • StumbleUpon
  • Reddit
  • Digg
  • Facebook

12 thoughts on “Installation

  1. spacer Brent Cowgill on said:

    Very good instructions. The Ubuntu setup went well. There’s this great article about setting up opera using apt-get which was helpful.

    www.liberiangeek.net/2011/12/install-opera-web-browser-using-apt-get-in-ubuntu-11-10-oneiric-ocelot/

    Do all this as root:
    wget -O – deb.opera.com/archive.key | apt-key add -
    echo deb deb.opera.com/opera/ stable non-free > /etc/apt/sources.list.d/opera.list
    apt-get update
    apt-get install opera

    Reply
  2. Pingback: Migrating Unit Tests from Selenium to Watir Webdriver

  3. spacer kim on said:

    later versions of Xcode – 4.4 at least, possibly 4.0, require that you install the Xcode command line tools before you can install safariwatir, or anything else for that matter.

    Watir-webdriver, apparently is more likely to be up to date than safariwatir.

    Reply
  4. spacer Holger on said:

    Above, all links to the installation instructions are not working any more.
    E.g. https://github.com/zeljkofilipin/watirbook/downloads leads to an Error 404 Page.

    It would be nice, if somebody could fix this – thank you! :-)

    Reply
    • spacer Željko Filipin on said:

      Thanks for letting me know, the links are fixed now. I have moved the book recently and I thought I have fixed all links.

      Reply
      • spacer Azahar on said:

        Still not working :(

        Reply
        • spacer Željko Filipin on said:

          What is not working?

          Reply
          • spacer Azahar on said:

            https://github.com/zeljkofilipin/watirbook/downloads is still throwing 404.
            Thanks.

            Reply
            • spacer Željko Filipin on said:

              That is what should happen, because the book has moved to leanpub.com/watirbook. Where did you find that link (so I can remove it)?

              Reply
  5. spacer Steve on said:

    I don’t think it’s such a good idea to install ruby using apt-get or yum. If you do, you’re stuck with the latest version that the repository has, which is never current. You surrender finer control and benefits of the latest ruby environment. I would follow the install steps for rbenv or RVM (don’t do both!!!).

    Reply
    • spacer Steve on said:

      if you use RVM, you won’t yum install rubygems either. You’ll do “rvm rubygems current”. Easy-peasy.

      Reply
    • spacer Željko Filipin on said:

      Installing ruby on Linux via apt-get or yum is the simplest way. If somebody just wants to try Ruby or Watir, there is no need to install RVM. If later on they decide they need a Ruby version that is not supported by their package manager, they can install RVM then.

      Reply

Leave a Reply Cancel reply

Fill in your details below or click an icon to log in:

spacer
spacer

You are commenting using your WordPress.com account. ( Log Out / Change )

spacer

You are commenting using your Twitter account. ( Log Out / Change )

spacer

You are commenting using your Facebook account. ( Log Out / Change )

Cancel

Connecting to %s