Friday, June 15, 2012

Watin Tool


In this blog iam describe the implementation and usage of watin
Watin is the one of the most  powerful  visual studio testing tool .watin tool develop in C# and the main goal  automating   the browser and test the project. watin can get and set values from the elements in a form, and you can fire events of any of the elements 

Download the watin click here
Following is the Hello world example of web test automation: searching Google.

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

No comments:

Post a Comment