-
Notifications
You must be signed in to change notification settings - Fork 4
WebDriver Examples
chrisabird edited this page Mar 9, 2012
·
3 revisions
[TestFixture]
public class TextBoxTests
{
private PlasmaDriver driver;
[SetUp]
public void Setup()
{
driver = TestFixture.Driver;
driver.Navigate().GoToUrl("/FormWithTextBox/");
}
[Test]
public void ShouldBeAbleToSetValueOfATextBox()
{
const string value = "the value";
driver.FindElement(By.Name("textBox")).SendKeys(value);
driver.FindElement(By.TagName("form")).Submit();
Assert.That(driver.FindElement(By.Id("textBoxValue")).Text, Is.StringContaining(value), driver.PageSource);
}
}