|
How to go about setting up FireWatir on different platforms? IntroductionThis page will describe steps to be followed while installing FireWatir on various OS. Steps common to all the platforms are: - Install Ruby from Download ruby from http://www.ruby-lang.org/en/downloads/
- Install Firefox browser and its JSSh extension.
- Allow popup for Firefox.
- 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- Download the Ruby one click installer from http://rubyforge.org/frs/?group_id=167&release_id=9267
- Download Firefox browser from http://www.mozilla.com and install
- 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.
- Download the FireWatir gem from http://code.google.com/p/firewatir/downloads/list.
- 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
- 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- Download ruby from http://www.ruby-lang.org/en/downloads/
- 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).
- Download the correct Firefox extension from http://code.google.com/p/firewatir/downloads/list.
- Install the extension and start Firefox using following command (assuming that you are in the directory where firefox is installed):
./firefox -jssh
- Now open terminal and check if jssh is correctly installed using following command:
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
- If everything works as above, download the FireWatir gem from http://code.google.com/p/firewatir/downloads/list
- 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
- 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- Download ruby from http://www.ruby-lang.org/en/downloads/
- 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).
- Download the correct Firefox extension from http://code.google.com/p/firewatir/downloads/list.
- Install the extension and start Firefox using following command (assuming that you are in the directory where firefox is installed):
./firefox-bin -jssh
- Now open terminal and check if jssh is correctly installed using following command:
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
- If everything works as above, download the FireWatir gem from http://code.google.com/p/firewatir/downloads/list
- 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
- 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
|
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).