Example usage for org.openqa.selenium.support.ui WebDriverWait WebDriverWait

List of usage examples for org.openqa.selenium.support.ui WebDriverWait WebDriverWait

Introduction

In this page you can find the example usage for org.openqa.selenium.support.ui WebDriverWait WebDriverWait.

Prototype

public WebDriverWait(WebDriver driver, Duration timeout) 

Source Link

Document

Wait will ignore instances of NotFoundException that are encountered (thrown) by default in the 'until' condition, and immediately propagate all others.

Usage

From source file:com.hotwire.selenium.bex.BexAbstractPage.java

License:Open Source License

protected void waitProgressBar() {
    new WebDriverWait(getWebDriver(), MAX_WAIT)
            .until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector(getProgressBar())));
}

From source file:com.hotwire.selenium.bex.BexAbstractPage.java

License:Open Source License

protected void waitElementStopMoving(String cssSelector, int timeout) {
    new WebDriverWait(getWebDriver(), 5)
            .until(new IsElementLocationStable(getWebDriver(), By.cssSelector(cssSelector), timeout));
}

From source file:com.hotwire.selenium.bex.BexAbstractPage.java

License:Open Source License

protected boolean isElementDisplayed(By byElement, int wait) {
    try {/*w ww.j a  va  2s .  com*/
        new WebDriverWait(getWebDriver(), wait).until(ExpectedConditions.visibilityOfElementLocated(byElement));
        return true;
    } catch (TimeoutException | NoSuchElementException | ElementNotVisibleException e) {
        return false;
    }
}