My favorites | Sign in
Project Logo
    
Search
for
Updated Oct 30, 2009 by zeljko.filipin
FireWatir_Installation  

How to go about setting up FireWatir on different platforms?

Introduction

This page will describe steps to be followed while installing FireWatir on various OS.

Steps common to all the platforms are:

  1. Install Ruby from Download ruby from http://www.ruby-lang.org/en/downloads/
  2. Install Firefox browser and its JSSh extension.
  3. Allow popup for Firefox.
  4. Run the unittests written to test FireWatir working. The Unittests are in a folder where FireWatir is installed. On the command prompt go to the FireWatir installation directory under unittests type
\unittests>ruby mozilla_all_tests.rb

Windows

  1. Download the Ruby one click installer from http://rubyforge.org/frs/?group_id=167&release_id=9267
  2. Download Firefox browser from http://www.mozilla.com and install
  3. Download .XPI file from http://code.google.com/p/firewatir/downloads/list
    • Open Firefox browser.
    • From File menu select Open File option.
    • Navigate to the path where the downloaded .XPI file is located. Select the .XPI file click open.
    • Wait till a dialog appear stating that do you want to install this extension. Click install.
    • The extension will not show up in the installed extensions list. For checking the installation of extension; follow steps below
    • Close Firefox. Restart it from command prompt using “Firefox installation directory/firefox.exe -jssh”. Make sure you give “-jssh” as parameter other wise Firefox will not start JSSh shell.
    • To check if JSSh is listening on port 9997 run command “telnet localhost 9997” from command prompt.
  4. Download the FireWatir gem from http://code.google.com/p/firewatir/downloads/list.
  5. Install FireWatir
    • Open a terminal or command prompt change directory where the gem is downloaded and
    • Type following command
    • >gem install firewatir-1.0.2.gem
  6. Go to installation directory of firewatir gem. Go to unittests directory. Run 'mozilla_all_tests.rb'. All tests should pass. If attach_to_new_window test fails then make sure that Firefox is configured to open a link in new Window rather than in new tab

Linux

  1. Download ruby from http://www.ruby-lang.org/en/downloads/
  2. Download Firefox from http://www.mozilla.com/en-US/firefox/all.html and install using the guidelines given in the release notes at http://www.mozilla.com/en-US/firefox/releases (click on version of Firefox you have downloaded).
  3. Download the correct Firefox extension from http://code.google.com/p/firewatir/downloads/list.
  4. Install the extension and start Firefox using following command (assuming that you are in the directory where firefox is installed):
  5. ./firefox -jssh
  6. Now open terminal and check if jssh is correctly installed using following command:
  7. telnet localhost 9997 This should take you to JSSh command prompt. If you are unable to connect to jssh command prompt make sure that extension that you are using is correct. If not log issue at http://code.google.com/p/firewatir/issues
  8. If everything works as above, download the FireWatir gem from http://code.google.com/p/firewatir/downloads/list
  9. Install FireWatir
    • Open a terminal or command prompt change directory where the gem is downloaded and
    • Type following command
    • >gem install firewatir-1.0.2.gem
  10. Run firefox manually using the command in step 4. Go to installation directory of firewatir gem. Go to unittests directory. Run 'mozilla_all_tests.rb'. All tests should pass. If attach_to_new_window test fails then make sure that Firefox is configured to open a link in new Window rather than in new tab

Mac OSX

  1. Download ruby from http://www.ruby-lang.org/en/downloads/
  2. Download Firefox from http://www.mozilla.com/en-US/firefox/all.html and install using the guidelines given in the release notes at http://www.mozilla.com/en-US/firefox/releases (click on version of Firefox you have downloaded).
  3. Download the correct Firefox extension from http://code.google.com/p/firewatir/downloads/list.
  4. Install the extension and start Firefox using following command (assuming that you are in the directory where firefox is installed):
  5. ./firefox-bin -jssh
  6. Now open terminal and check if jssh is correctly installed using following command:
  7. telnet localhost 9997 This should take you to JSSh command prompt. If you are unable to connect to jssh command prompt make sure that extension that you are using is correct. If not log issue at http://code.google.com/p/firewatir/issues
  8. If everything works as above, download the FireWatir gem from http://code.google.com/p/firewatir/downloads/list
  9. Install FireWatir
    • Open a terminal or command prompt change directory where the gem is downloaded and
    • Type following command
    • >gem install firewatir-1.0.2.gem
  10. Run firefox manually using the command in step 4. Go to installation directory of firewatir gem. Go to unittests directory. Run 'mozilla_all_tests.rb'. All tests should pass. If attach_to_new_window test fails then make sure that Firefox is configured to open a link in new Window rather than in new tab

For more information please refer to this tutorial. http://crasch.livejournal.com/550521.html


Comment by peter.vandenabeele.be, Apr 18, 2008

Since April 2008, the newest version is firewatir-1.1.1.gem so you preferably use that version (instead of the 1.0.2 version mentioned above). It works correctly on Ubuntu 7.10 with Firefox 2.0.x. Regarding the installation of jssh on Linux, I used the advise and downloads from this site: http://alephzarro.com/blog/2007/03/12/jssh-for-firefox-on-linux-because-firewatir-loves-it/ and all worked flawlessly. Thanks ! (peter AT vandenabeele DOT com).

Comment by Dennis.I.89, Feb 26, 2009

I've been having a tremendous amount of trouble trying to get FireWatir? to work. Every site has different documentation for the installation. I decided to try the instructions on this page. When I run 'mozilla_all_tests.rb', I get this error:

>ruby mozilla_all_tests.rb C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- unittests/setup/lib (LoadError?)

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/unittests/setup.rb:16 from mozilla_all_tests.rb:3:in `require' from mozilla_all_tests.rb:3

Trying to get FireWatir? to work is greatly frustrating, I've been trying for 2 days now. I suggest making it much easier to install and run. I didn't have a problem installing Ruby and Watir, but FireWatir? is just ridiculous.

Comment by azam.kenan, Mar 31, 2009

I followed this link and the steps worked for me. I however, downloaded the nightly build because it allowed me to run all the unittests for firewatir.

http://wiki.openqa.org/display/WTR/FireWatir

Comment by utahkay, May 20, 2009

I too could not run unit tests for FireWatir?. Although the instructions here say to install the gem, then run unit tests, this email:

http://www.mail-archive.com/watir-general@googlegroups.com/msg00926.html

says that unit tests are available only in a development tree.

It sure would be nicer to get the happy feeling of tests passing after I install the gem. Oh well.


Sign in to add a comment
Hosted by Google Code