Skip to content
chrisabird edited this page Mar 9, 2012 · 3 revisions

Examples of using the PlasmaWebDriver

[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);
    }
}
Clone this wiki locally