JSSh for Firefox on Linux (because Firewatir loves it)

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+

Oh, by the way, JSSh stands for JavaScript Shell and it allows you remotely manipulate Firefox remotely. Firewatir gives you a higher-level toolkit for “Web Application Testing in Ruby” (of course not Web scraping ;>>> ). Talking about it let me show how to install the whole thing:

(0. I would recommand to create a dedicated Firefox profile run Firefox in a dedicated profile firefox -ProfileManager)

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
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to the Mozilla JavaScript Shell!
> 1+1
2
> help()
....
> exit()

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 2.0.0.1 on Ubuntu (Eft), Kubuntu, Gentoo. Update: tested also on FF 1.5(.0.7)