Update: These code samples will no longer work as off WatiN 2.0 beta 1 and higher
I just released WatiN 2.0 Community Technology Preview! So start automation IE and/or FireFox with WatiN as of today. Read how to get started and download the release here. Be aware that the API can (and there for will) change till the final 2.0 release. Here is an example:
[Test]
public void SearchForWatiNOnGoogleVerbose()
{
using (IBrowser ie = BrowserFactory.Create(BrowserType.InternetExplorer))
{
ie.GoTo(http://www.google.com);
ie.TextField(Find.ByName("q")).Value = "WatiN";
ie.Button(Find.ByName("btnG")).Click();
Assert.IsTrue(ie.ContainsText("WatiN"));
}
using (IBrowser firefox = BrowserFactory.Create(BrowserType.FireFox))
{
firefox.GoTo(http://www.google.com);
firefox.TextField(Find.ByName("q")).Value = "WatiN";
firefox.Button(Find.ByName("btnG")).Click();
Assert.IsTrue(firefox.ContainsText("WatiN"));
}
}
A big thanks to Edward Wilde for all the work he has done on integrating FireFox in WatiN! And of course we like to hear what you think of it.
Have fun