It goes like this: Firewatir, the Firefox port of WATIR, depends on JSSh. And JSSh does not install & run nicely on Linux. Clear ?
Annoyed by this situation, I looked what’s the problem with this JSSh. To make the story short, success – downlaod the working JSSh for Linux here.
Update 2007-04-11: modified to work also with FF 1.5.3+
(0. I would recommand to create a dedicated Firefox profile run Firefox in a dedicated profile
1. Downlaod and install JSSh extension to Firefox and restart it.
2. Start Firefox:
firefox -P testyard -jssh
The JSSh should be up, listening on port 9997 (note: consider security issues). You should be able to communicate with Firefox via telnet. For example:
>telnet localhost 9997
Connected to localhost.
Escape character is '^]'.
3. Dowload firewatir (you have to do it from its homepage, it is not on rubyforge yet). Use the mswin32 version, although you are on Linux. Install:
sudo gem install firewatir-1.0.1-mswin32.gem
3. Get to the real ruby test. For example:
require 'rubygems' require 'firewatir' include FireWatir ff=Firefox.new ff.goto("http://www.google.com/ncr") ff.text_field(:name,"q").set("ruby") ff.button(:value,"Google Search").click puts ff.element_by_xpath("//a[@class='l']").text ff.close
PS: For those interested in what did I fix: I took one of the latest builds from Dave, repackaged it so that it installs “properly” – as an extension of “21st century” – and added the config GUI shipped originally with the JSSh. It was tested with FF 126.96.36.199 on Ubuntu (Eft), Kubuntu, Gentoo. Update: tested also on FF 1.5(.0.7)