Package com.thoughtworks.inproctester.webdriver

Examples of com.thoughtworks.inproctester.webdriver.InProcessHtmlUnitDriver.findElement()


        contactNameElement.sendKeys("My Contact");

        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.getCurrentUrl(), is("http://localhost/contacts/1"));
        assertThat(htmlUnitDriver.findElement(By.name("contactName")).getAttribute("value"), is("My Contact"));

    }

    @Test
    public void shouldSupportUtfEncodedData() {
View Full Code Here


    public void shouldSupportUtfEncodedData() {

        WebDriver htmlUnitDriver = new InProcessHtmlUnitDriver(httpAppTester);

        htmlUnitDriver.get("http://localhost/contacts/add");
        WebElement contactNameElement = htmlUnitDriver.findElement(By.name("contactName"));
        contactNameElement.clear();
        contactNameElement.sendKeys("Имя Контакта");
        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.findElement(By.name("contactName")).getAttribute("value"), is("Имя Контакта"));
View Full Code Here

        htmlUnitDriver.get("http://localhost/contacts/add");
        WebElement contactNameElement = htmlUnitDriver.findElement(By.name("contactName"));
        contactNameElement.clear();
        contactNameElement.sendKeys("Имя Контакта");
        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.findElement(By.name("contactName")).getAttribute("value"), is("Имя Контакта"));

    }
View Full Code Here

        WebElement contactNameElement = htmlUnitDriver.findElement(By.name("contactName"));
        contactNameElement.clear();
        contactNameElement.sendKeys("Имя Контакта");
        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.findElement(By.name("contactName")).getAttribute("value"), is("Имя Контакта"));

    }


    @Test
View Full Code Here

    public void shouldSupportCookies() {
        WebDriver htmlUnitDriver = new InProcessHtmlUnitDriver(httpAppTester);
        htmlUnitDriver.manage().deleteAllCookies();

        htmlUnitDriver.get("http://localhost/contacts/add");
        htmlUnitDriver.findElement(By.name("contactName")).sendKeys("My Contact");
        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.findElement(By.className("message")).getText(), is("Success"));

        htmlUnitDriver.get("http://localhost/contacts/1");
View Full Code Here

        WebDriver htmlUnitDriver = new InProcessHtmlUnitDriver(httpAppTester);
        htmlUnitDriver.manage().deleteAllCookies();

        htmlUnitDriver.get("http://localhost/contacts/add");
        htmlUnitDriver.findElement(By.name("contactName")).sendKeys("My Contact");
        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.findElement(By.className("message")).getText(), is("Success"));

        htmlUnitDriver.get("http://localhost/contacts/1");
View Full Code Here

        htmlUnitDriver.get("http://localhost/contacts/add");
        htmlUnitDriver.findElement(By.name("contactName")).sendKeys("My Contact");
        htmlUnitDriver.findElement(By.tagName("form")).submit();

        assertThat(htmlUnitDriver.findElement(By.className("message")).getText(), is("Success"));

        htmlUnitDriver.get("http://localhost/contacts/1");

        Cookie flashMessageCookie = htmlUnitDriver.manage().getCookieNamed("FLASH_MESSAGE");
        assertThat(flashMessageCookie, is(nullValue()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.