Package com.thoughtworks.inproctester.webdriver

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


    }

    @Test
    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();
View Full Code Here


        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()));


         assertThat(htmlUnitDriver.findElements(By.className("message")), is(Matchers.<WebElement>empty()));
    }
View Full Code Here


    @Test
    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();
View Full Code Here

        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()));


        assertThat(htmlUnitDriver.findElements(By.className("message")), is(Matchers.<WebElement>empty()));
    }
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.