JSSH – the driver of Firefox | Optimized Global Delivery
Optimized Global Delivery Blog

JSSH – the driver of Firefox

This article will reveal you the secret of Watir/Watin.


As popular as Selenium, Watir/Watin is another open source tool which can be used to conduct automated testing on different browsers. To support multiple browsers, drivers of different browsers have been developed by Watir & Watin. And for firefox, JSSH is employed to fulfill the purpose of manipulating the browser.

What is JSSH?
JSSH (JavaScript SHell) is a firefox extension written in C++. Through it, you can run javascript on the remote firefox, which makes it possiblel to manipulate Firefox through methods defined in DOM.

The source code of JSSH is available at http://code.google.com/p/firewatir/source/browse/trunk/?r=131#trunk/Installation


An “Hello JSSH” example – Google.com


  • You need to install the JSSH extension first. Click here for detail.
  • Start the firefox with JSSH support.
  • firefox -jssh

  • Telnet to the JSSH. The default port is 9997.

telnet localhost 9997

  • In the terminal, enter following javascript line by line.

var w0 = getWindows()[0];
var browser = w0.getBrowser();
var doc = browser.contentDocument;
var input = doc.getElementsByName(“q”)[0];
var button = doc.getElementsByName(“btnG”)[0];
input.value = “hello JSSH”;

Subscribe to the Optimized Global Delivery Weekly Digest

* indicates required

Leave a Reply

Optimized Global Delivery Blog

What it takes to deliver successful global engagements