WatIN

From Logic Wiki
Revision as of 13:27, 9 May 2016 by Dt1nh6 (Talk | contribs) (1 revision imported)

(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