Package org.openqa.selenium

Examples of org.openqa.selenium.NotFoundException


        String origin;
        WebDriver driver = context.getWrappedDriver();
        try {
            String handle = driver.getWindowHandle();
            if (StringUtils.isEmpty(handle))
                throw new NotFoundException();
            driver.switchTo().window(handle);
            String url = driver.getCurrentUrl();
            String title = driver.getTitle();
            message = formatUrlAndTitle(url, title);
            origin = getOrigin(url);
View Full Code Here


    }

    @Test
    public void bySpanIsGoneBeforeWeLookForIt() {
        By id = id("id");
        when(webDriver.findElement(id)).thenThrow(new NotFoundException("span"));
        fluentWebDriver.without(secs(2)).span(id);
        Assert.assertThat(count, equalTo(0));
    }
View Full Code Here

        nfwd.h4(BYID);
    }

    @Test
    public void testP() throws Exception {
        when(wd.findElement(tagName("p"))).thenThrow(new NotFoundException());
        nfwd.p();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.p(BYID);
    }
View Full Code Here

        nfwd.p(BYID);
    }

    @Test
    public void testB() throws Exception {
        when(wd.findElement(tagName("b"))).thenThrow(new NotFoundException());
        nfwd.b();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.b(BYID);
    }
View Full Code Here

        nfwd.b(BYID);
    }

    @Test
    public void testPre() throws Exception {
        when(wd.findElement(tagName("pre"))).thenThrow(new NotFoundException());
        nfwd.pre();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.pre(BYID);
    }
View Full Code Here

        nfwd.pre(BYID);
    }

    @Test
    public void testheader() throws Exception {
        when(wd.findElement(tagName("header"))).thenThrow(new NotFoundException());
        nfwd.header();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.header(BYID);
    }
View Full Code Here

        nfwd.header(BYID);
    }

    @Test
    public void testfooter() throws Exception {
        when(wd.findElement(tagName("footer"))).thenThrow(new NotFoundException());
        nfwd.footer();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.footer(BYID);
    }
View Full Code Here

        public WebElement answer(InvocationOnMock invocation) throws Throwable {
            long now = System.currentTimeMillis();
            boolean durationHasElapsed = duration.getEndMillis(startedAt()) <= now;
            if (durationHasElapsed) {
                throw new NotFoundException("");
            }
            return webElement;
        }
View Full Code Here

        nfwd.footer(BYID);
    }

    @Test
    public void testfigure() throws Exception {
        when(wd.findElement(tagName("figure"))).thenThrow(new NotFoundException());
        nfwd.figure();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.figure(BYID);
    }
View Full Code Here

        nfwd.figure(BYID);
    }

    @Test
    public void testacronym() throws Exception {
        when(wd.findElement(tagName("acronym"))).thenThrow(new NotFoundException());
        nfwd.acronym();
        when(wd.findElement(BYID)).thenThrow(new NotFoundException());
        nfwd.acronym(BYID);
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.NotFoundException

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.