Package org.seleniumhq.selenium.fluent

Examples of org.seleniumhq.selenium.fluent.FluentWebElement$RetryingFluentWebElement


        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


        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

        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

    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

Related Classes of org.seleniumhq.selenium.fluent.FluentWebElement$RetryingFluentWebElement

Copyright © 2018 www.massapicom. 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.