Thats basically my question. I have searched the internet and I have no idea! I read in a tutorial (http://www.layeredthoughts.com/automation/how-to-write-your-first-ruby-web-bot-in-watir-scraping-weather-com) that I need to install JSSH for the tutorial to work, but there are no instructions on how to do this and I cannot find anything on the watir homepage.
1 Answers
You do not need to install the JSSH plugin to drive Firefox.
If I recall correctly, the JSSH plugin was needed several years ago - probably back in 2010 when the article you referenced was written. Driving Firefox, as well as Watir, have come a long way since then.
As a result, you should try following a more recent tutorial. Then go back to the article you were reading if there are additional tips you need, but would like need to adjust.
Ċ½eljko Filipin's Watirbook has been frequently updated with steps for installing Selenium-Webdriver on various operating systems for various browsers. Note that Watir is simply an API wrapper around Selenium.
The installation steps are simply (for more explicit details/steps see the book):
- Install Ruby
- Install selenium-webdriver
- Install the watir and watir-webdriver gems (this is not listed in the book, but they are required if you want to use the Watir API instead)
- Install Firefox (if it is not already)
That is it. The other plugins (Test-Wise Recorder, Firebug, FireXPath) are not needed. The latter two can be replaced by Firefox's built-in developer tools. The usefulness of recorder is often debated.
Once everything is installed you can start off with a script like:
require 'watir'
browser = Watir::Browser.new :firefox
browser.goto 'http://www.weather.com/
Then you can start working on automating the page.

- 46,526
- 5
- 91
- 101