Just sharing some of my inconsequential lunch conversations with you... RSS  

Thursday, February 19, 2009

WatiN: Web Application Testing in .NET

Here’s another open source library for automating web browsers: WatiN.

Here a sample usage:

[Test]
public void SearchForWatiNOnGoogle()
{
using (IE ie = new IE("http://www.google.com"))
{
ie.TextField(Find.ByName("q")).TypeText("WatiN");
ie.Button(Find.ByName("btnG")).Click();

Assert.IsTrue(ie.ContainsText("WatiN"));
}
}



Not that I find them real useful today. But maybe one day…

No comments:

Development Catharsis :: Copyright 2006 Mário Romano