|
using System;
using NUnit.Framework;
using WatiN.Core;
using System.Text.RegularExpressions;
namespace Tests
{
[TestFixture]
public class MainTest : MainProgram
{
[Test]
public void CheckBadLogin()
{
ie.GoTo("http://localhost:2434/");
ie.TextField(Find.ById("TextBox1")).TypeText("rabbi");
ie.TextField(Find.ById("TextBox2")).TypeText("rabbi");
ie.Button(Find.ById("Button1")).Click();
Assert.IsFalse(ie.ContainsText("Unknown User"));
}
[Test]
public void CheckLogin()
{
ie.GoTo("http://localhost:2434/");
ie.TextField(Find.ById("TextBox1")).TypeText("rabbi");
ie.TextField(Find.ById("TextBox2")).TypeText("rabbi");
ie.Button(Find.ById("Button1")).Click();
Assert.IsTrue(ie.ContainsText("Welcome Rabbi"));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.