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.
- 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?
- Download WatiN 2.0 CTP
at the time I wrote this, I'm using WatiN-188.8.131.520-net-2.0.zip
- Install jssh firefox plugin
it's included in the zip (Firefox\jssh)
- Remove all warnings from Firefox 2 so it does not get in the way of WatiN
tools> options > security > untick remember password for sites
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.