Examples of FluentWebElement


Examples of org.fluentlenium.core.domain.FluentWebElement

    private void assertNoPageReloadOccured() {
        assertThat(url(), is(getUrl())); // No page reload to somewhere else
    }

    public void search(String term) {
        FluentWebElement searchBox = findFirst("#search");
        searchBox.clear();
        searchBox.text(term);
    }
View Full Code Here

Examples of org.seleniumhq.selenium.fluent.FluentWebElement

        when(we.getTagName()).thenReturn("div");
        when(we.findElement(ID_B)).thenReturn(we2);
        when(we2.getTagName()).thenReturn("div");

        try {
            FluentWebElement span = fwd.div(ID_A).div(ID_B);
            doThrow(new RuntimeException()).when(we2).findElement(tagName("span"));
            span.span();
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
            assertThat(e.getMessage(), equalTo("RuntimeException during invocation of: ?.div(By.id: idA).div(By.id: idB).span()"));
            assertThat(e.getCause(), notNullValue());
            verify(wd).executeScript("op", we2, "value");
View Full Code Here

Examples of org.seleniumhq.selenium.fluent.FluentWebElement

        when(we2.getTagName()).thenReturn("div");
        when(we2.findElement(tagName("span"))).thenReturn(we3);
        when(we3.getTagName()).thenReturn("span");

        try {
            FluentWebElement span = fwd.div(ID_A).div(ID_B).span();
            doThrow(new RuntimeException()).when(we3).sendKeys("RAIN_IN_SPAIN");
            span.sendKeys("RAIN_IN_SPAIN");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
            assertThat(e.getMessage(), equalTo("RuntimeException during invocation of: ?.div(By.id: idA).div(By.id: idB).span().sendKeys('RAIN_IN_SPAIN')"));
            assertThat(e.getCause(), notNullValue());
            verify(wd).executeScript("op", we3, "value");
View Full Code Here

Examples of org.seleniumhq.selenium.fluent.FluentWebElement

        when(we2.getTagName()).thenReturn("div");
        when(we2.findElement(tagName("span"))).thenReturn(we3);
        when(we3.getTagName()).thenReturn("span");

        try {
            FluentWebElement span = fwd.div(ID_A).div(ID_B).span();
            doThrow(new RuntimeException()).when(we3).getText();
            span.getText().shouldBe("foo");
            fail("should have barfed");
        } catch (FluentExecutionStopped e) {
            assertThat(e.getMessage(), equalTo("RuntimeException during invocation of: ?.div(By.id: idA).div(By.id: idB).span().getText().shouldBe('foo')"));
            assertThat(e.getCause(), notNullValue());
            verify(wd).executeScript("op", we3, "value");
View Full Code Here

Examples of org.seleniumhq.selenium.fluent.FluentWebElement

    public void abbr_functionality2() {

        when(wd.findElement(By.xpath(".//abbr[not(@foo)]"))).thenReturn(we);
        when(we.getTagName()).thenReturn("abbr");

        FluentWebElement fe = fwd.abbr(FluentBy.notAttribute("foo"));

        assertThat(fe, notNullValue());

    }
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.