login
Blurts on the Art of Software Development

Today | RSS | RDF | Atom | Other Tags
Categories : All | All | CI | .NET | General | Humour | Java | Personal | Reviews | Ruby | SW Eng

No, not the Java SSH library. JSSh is a promising-looking cross-platform plugin for the Mozilla family of browsers that lets us script a browser over a network socket.

The way it works is that you install the .xpi file (the plugin), launch the browser with the "-jssh" option, and start sending commands to port 9997. Sounds like the automator's wet dream? It sure does... But it's not that simple.

You see, some weeks ago I was trying to get that damn .xpi file installed on my Fedora laptop for 15 minutes and it just wouldn't happen. I could download the file alright, but when I tried to actually install it, Firefox said something about not finding the file. Later on, I figured out that I needed to use Mozilla--the "real" Mozilla--and not Firefox.

Bang.
Plugin installed.
Bang.
Browser launched with the "-jssh" option.
Somebody's listening on port 9997.
Can this be true?

Of course not.

[lkoskela@kera ~]$ telnet localhost 9997
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
JSSh server: new connection!
###!!! ASSERTION: failed to get script security manager: 'Error', file /home/alex/devel/mozilla-trees/clean/mozilla/extensions/jssh/nsJSSh.cpp, line 567
Break: at file /home/alex/devel/mozilla-trees/clean/mozilla/extensions/jssh/nsJSSh.cpp, line 567
Welcome to the Mozilla JavaScript Shell!

> print("hello")
Connection closed by foreign host.
[1]+  Segmentation fault      mozilla -jssh

As I said, this was a few weeks ago and the need is no longer that urgent but if you've gotten this to work and have documented your setup somewhere online, I'd love a pointer.

Having said that, I am aware of the disclaimers about JSSh depending on unfrozen Mozilla APIs which might change from one version to another ("WARNING: As JSSh uses unfrozen Mozilla APIs there is quite a big chance that these XPIs will not work in a particular Mozilla release."). What I'm basically looking for is rumors of which versions of which have been proven to work...


Hi

It works with Mozilla 1.8b -
http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.8b1/

Sample run -

[jain@ps2913 jain]$ telnet localhost 9976
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to the Mozilla JavaScript Shell!

> 5+5
10
> help(getWindows)
getWindows() returns a list of all currently open windows
> var w0 = getWindows()[0]
1
> var w0 = getWindows()[0]
2
..
..
> browser.loadURI(<some URL>) -> even this worked


Pls try it and let me know if you have any issue.
Now the next thing is how can we extend this for auto web application testing? Pls let me know If you have any suggestion on this.

Thanks,
cp
Hey, cool. Thanks. It does indeed work with 1.8b1 (build 2005021712) on Windows. I'll report back again when I've had the chance to try it on a Linux box.
Hi, i tried to compile firefox (and mozilla 1.8b1) with jssh under linux but it doesn't work : compilation is OK and firefox run fine but no jssh extension ! (i use firefox -jssh to launch it) there is no jssh submenu in tools, no listening on port. Do you have any idea ? Thanks in advance !
I am having a lot of problems installing the JSSH extension on firefox. Do I have to replace the files mentioned on svnqa even before I can connect to 9997. Basically I get a connect failed on the command prompt everytime I try to telnet it. I have the latest XPI from the svnqa site. Does that have to do anythign with my watir.rb file?
I'm afraid I have no idea what files you're talking about nor what this "svnqa site" is.
The way it works is that you install the .xpi file (the plugin)

Where can that be found? The jSSH link leads to a page that makes oblique references to getting source code from CVS; no mention of an xpi file.

Hmm. It's been a long time and I have no idea where I got the .xpi file back then. However, it looks like the FireWatir project hosts an .xpi that you could try. (Scroll down and click the "Installation Document" link)
The link from FireWatir is windows specific XPI file. Does anybody know where to get an XPI file for Linux (FC6) ?
I have the latest firefox 3.0.1 version and I have installed the .xpi file for Windows. But then,it's giving a connection failed on the command prompt,every time I telnet it.Any idea,why it's so? Thanks in advance.
Have you started Firefox with the "-jssh" option?
Yeah..I had started Firefox with "-jssh" as option.Actually I tried to install the jssh file 'jssh-20060221-WINNT.xpi' through my latest firefox, but it didnt give any message like 'Installation complete'.I doubt it got installed or not.What to do? It's not even giving any failure message.


Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 8 + 5 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/lasse/addTrackBack.action?entry=1130662725514