views:

897

answers:

2

I am trying to get firewatir to run on Mac OSX Leopard. I have Firefox 3.6rc2 installed but running the most simple script does not work:

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

i am getting the following error

/usr/local/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/firefox.rb:237:in `set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option (Watir::Exception::UnableToStartJSShException)
from /usr/local/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/firefox.rb:131:in `initialize'
from ./watir-test.rb:12:in `new'
from ./watir-test.rb:12

even when I am trying to start Firefox with the -jssh option, I get an error (although another one)

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

the error output in that case:

/usr/local/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/firefox.rb:125:in `initialize': Firefox is running without -jssh (RuntimeError)

is there any tutorial or hnt to get firewatir actually running on Mac OSX?

+2  A: 

Did you install jssh plugin?

jssh plugin has to be compiled for each OS and browser version, so it is likely not going to work on Firefox 3.6, since we do not have plugin for 3.6 compiled yet

I would highly suggest that you try prerelease watir-webdriver gem that can drive Firefox on Mac

If you need any further help, ask. :)

Željko Filipin
A: 

Try this...

http://www.natontesting.com/2009/07/24/firewatir-jssh-unable-to-connect-fixed/

Nat Ritmeyer
thanks for the pointer!
z3cko