Getting WatiN to work with Firefox

I don't think WatiN need much of an introduction. But for those who don't quite know what WatiN is, it's a Web UI testing framework. Other similar products are Mercury and Selenium (written by thoughtworks, the name came from the substance Selenium - se which is believed to have an adverse effect on Mercury poisoning... nice pun huh?).

For more info visit watin.sourceforge.net

Since Internet Explorer and Firefox are treated as two different sessions even when launched from the same machine, having WatiN to work with these 2 browsers becomes extremely useful when checking how your web app behaves between 2 different sessions (cross user/thread safety).

Here are steps to have WatiN to work with not just Internet Explorer but Firefox too.

  1. Make sure to have Firefox 2 installed.
    The current Watin 2.0 CTP firefox plugin jssh is currently not compatible with Firefox 3 (October 08, 2008)
    So, uninstall firefox 3 and download Firefox 2.

    If you can't bare the thought of not having the latest Firefox installed, why not try Portable firefox 3?

  2. Download WatiN 2.0 CTP
    at the time I wrote this, I'm using WatiN-2.0.0.1000-net-2.0.zip
  3. Install jssh firefox plugin
    it's included in the zip (Firefox\jssh)
  4. Remove all warnings from Firefox 2 so it does not get in the way of WatiN
    something for my blog
    tools> options > security > untick remember password for sites

    something for my blog
    same tab >warning messages settings ... > untick everything

Here is some documentation to write testing script for multiple browser: WatiN documentation.

Just be mindful that the IBrowser interface does not yet support that all the stuff that IE class support. There are also some slight difference in signatures between the two. So, if you already have bunch of WatiN test that uses the IE class, it might take you a while to transition.

  1. Ronald Widha» Blog Archive » Running a WatiN test scenario on all browsers says:

    [...] User Acceptance Test scenarios in the past, and have posted some tips and tricks to get the Firefox plugin working (which constantly crash even with the newer [...]