WatIN

From Logic Wiki
Revision as of 16:10, 21 August 2014 by Macrop (Talk) (Created page with "Category:BDD Category:Tests Category:CSharp Category:Extreme Programming == WatiN Overview == [http://watin.org/ WatIN] aims to bring you an easy way to auto...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


WatiN Overview

WatIN aims to bring you an easy way to automate your tests with Internet Explorer and FireFox using .Net.

WatiN Example

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"));
  }
}

Installation

PM> Install-Package WatiN