WatiNGettingStarted



WatiNGettingStarted
using System;
using System.IO;
using NUnit.Framework;
using WatiN.Core;

namespace WatiNGettingStarted
{
[TestFixture]
public class WatiNConsoleExample
{
[Test]
public void Test()
{
// Open a new Internet Explorer window and
// goto the google website.

Console.WriteLine("test1");
IE ie = new IE("http://www.google.com");

Console.WriteLine("test2");

// Find the search text field and type Watin in it.
ie.TextField(Find.ByName("q")).TypeText("WatiN");

// Click the Google search button.
ie.Button(Find.ByValue("Google Search")).Click();
// Uncomment the following line if you want to close
// Internet Explorer and the console window immediately.
ie.Close();
}
}
}

0 comments:

Post a Comment