altf

Working with Watir on a mac

Posted in QA by AltF on July 9, 2010

Watir on a Mac can be used either with FireWatir, or SafariWatir, but not Watir itself because it has IE requirements.

Installation:

1. Check if you have ruby installed on your mac. (Recommended Ruby 1.8.6)

ruby -v

2. Install firewatir

sudo gem update --system
sudo gem install firewatir

3. Install plugin in your browser (Mac plugin for Firefox 3.6)

4. Start firefox with ssh option from command line

/Applications/Firefox.app/Contents/MacOS/firefox-bin -jssh

5. Sample script

require 'rubygems'
require 'firewatir'
ff=FireWatir::Firefox.new
ff.goto("http://mail.yahoo.com")

One Response

Subscribe to comments with RSS.

  1. andrew said, on January 20, 2011 at 2:33 pm

    Thanks, this post helped me greatly.

    wrote a comprehensive test for firefox with watir, now trying to run it across other browsers within the same script!

    cheers, thanks again.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: