Package org.openqa.selenium.support.ui

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()


        wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id("upload_label")));

        d.switchTo().frame("upload_target");

        wait = new WebDriverWait(d, 5);
        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath("//body"), LOREM_IPSUM_TEXT));

        // Navigate after file upload to verify callbacks are properly released.
        d.get("http://www.google.com/");
    }
View Full Code Here


        String handle = d.getWindowHandle();
        d.findElement(By.id("new_window")).click();

        // Wait until we can switch to the new window
        WebDriverWait waiter = new WebDriverWait(d, 10);
        waiter.until(new Function<WebDriver, Object>() {
            @Override
            public Object apply(@Nullable WebDriver input) {
                try {
                    d.switchTo().window("close_me");
                    return true;
View Full Code Here

        assertEquals(1, d.findElements(By.name("windowOne")).size());
        d.findElement(By.name("windowOne")).click();

        // Wait until we can switch to the new window
        WebDriverWait waiter = new WebDriverWait(d, 10);
        waiter.until(new Function<WebDriver, Object>() {
            @Override
            public Object apply(@Nullable WebDriver input) {
                try {
                    d.switchTo().window("result");
                    return true;
View Full Code Here

        phantom.findElement(By.id("go")).submit();

        // Uploading files across a network may take a while, even if they're really small.
        // Wait for the loading label to disappear.
        WebDriverWait wait = new WebDriverWait(phantom, 10);
        wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id("upload_label")));

        phantom.switchTo().frame("upload_target");

        wait = new WebDriverWait(phantom, 5);
        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath("//body"), LOREM_IPSUM_TEXT));
View Full Code Here

        wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id("upload_label")));

        phantom.switchTo().frame("upload_target");

        wait = new WebDriverWait(phantom, 5);
        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath("//body"), LOREM_IPSUM_TEXT));

        // Navigate after file upload to verify callbacks are properly released.
        phantom.get("http://www.google.com/");
    }
}
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.