List of usage examples for org.openqa.selenium.support.ui WebDriverWait WebDriverWait
public WebDriverWait(WebDriver driver, Duration timeout)
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; } }