public void waitForElementVisibility(WebElement element) { waitFor(ExpectedConditions.visibilityOf(element)); }
private ExpectedCondition<?> getDefaultCondition(By myBy) { // generate the most popular wiatCondition to check if element visible or present ExpectedCondition<?> waitCondition = null; if (element != null) { waitCondition = ExpectedConditions.or(ExpectedConditions.presenceOfElementLocated(myBy), ExpectedConditions.visibilityOfElementLocated(myBy), ExpectedConditions.visibilityOf(element)); } else { waitCondition = ExpectedConditions.or(ExpectedConditions.presenceOfElementLocated(myBy), ExpectedConditions.visibilityOfElementLocated(myBy)); } return waitCondition; } }
/** * Wait until the element becomes visible * * @param element element * @param message message in case the element did not appear after waiting * @param timeout condition timeout in seconds */ public static void visibility(WebElement element, String message, int timeout) { wait(ExpectedConditions.visibilityOf(element), message, timeout); }
@Override public WebElement getTitleTextField() { return bobcatWait.until(visibilityOf(titleTextField)); }
@Override public void verifyIsDisplayed() { bobcatWait.until(ExpectedConditions.visibilityOf(toolbar)); } }
/** * Waits visibility of provided {@code webElement} and clicks once on it by {@link * WebElement#click()}. * * @param webElement element which should be clicked * @param timeout waiting time in seconds */ public void waitAndClick(WebElement webElement, int timeout) { webDriverWaitFactory.get(timeout).until(visibilityOf(webElement)).click(); }
/** * @Title: waitForSeconds @Description: TODO @author * ahu@greendotcorp.com @param @param e @return void return * type @throws */ public void waitForElementPresent(WebElement e) { // throw new PendingException(); // int seconds=Integer.parseInt(s); waitforElement().until(ExpectedConditions.visibilityOf(e)); }
/** * @Title: waitForSeconds @Description: TODO @author * ahu@greendotcorp.com @param @param e @return void return * type @throws */ public void waitForElementPresent(WebElement e) { // throw new PendingException(); // int seconds=Integer.parseInt(s); waitforElement().until(ExpectedConditions.visibilityOf(e)); }
/** * Waits during {@code timeout} until provided {@code webElement} is visible. * * @param webElement element which should be checked * @param timeout waiting time in seconds * @return found element */ public WebElement waitVisibility(WebElement webElement, int timeout) { return webDriverWaitFactory.get(timeout).until(visibilityOf(webElement)); }
/** * Method used to verify if this element is visible. */ @Override public void verifyIsDisplayed() { authorLoader.verifyIsHidden(); bobcatWait.until(visibilityOf(currentScope)); }
@Override public ExpectedCondition<Boolean> isVisible() { return new BooleanConditionWrapper(ExpectedConditions.visibilityOf(element), getNegation(), NoSuchElementException.class); }
public static boolean isDisplayed(WebElement webElement, long secondsToWait) { try { WebElement foundWebElement = new WebDriverWait(driver(), secondsToWait).until(ExpectedConditions.visibilityOf(webElement)); return foundWebElement != null; } catch (RuntimeException e) { return false; } }
public static boolean isDisplayed(WebElement webElement, long secondsToWait) { try { WebElement foundWebElement = new WebDriverWait(driver(), secondsToWait).until(ExpectedConditions.visibilityOf(webElement)); return foundWebElement != null; } catch (RuntimeException e) { return false; } }
/** * Wait until element present * * @param webElement Desired web element * @param timeout Timeout in seconds */ public static void waitUntilElementPresent(WebElement webElement, int timeout) { new WebDriverWait(PageFactory.getDriver(), timeout). until(ExpectedConditions.visibilityOf(webElement)); }
public static void waitForElementToDisplay(WebElement webElement, long secondsToWait, long sleepInMillis) { WebDriverWait wait = new WebDriverWait(driver(), secondsToWait, sleepInMillis); wait.until(ExpectedConditions.visibilityOf(webElement)); }
public boolean waitUntilElementIsPresent(WebElement webElement, long seconds) { return innerTimeoutOperation(() -> { WebDriverWait webDriverWait = new WebDriverWait(driver, seconds, 0L); webDriverWait.until(ExpectedConditions.visibilityOf(webElement)); return webDriverWait; }); }
public static void waitForElementToDisplay(WebElement webElement, long secondsToWait) { WebDriverWait wait = new WebDriverWait(driver(), secondsToWait); wait.until(ExpectedConditions.visibilityOf(webElement)); }
/** * Wait until element present * * @param webElement Desired web element */ public static void waitUntilElementPresent(WebElement webElement) { new WebDriverWait(PageFactory.getDriver(), PageFactory.getTimeOutInSeconds()). until(ExpectedConditions.visibilityOf(webElement)); }
public static void waitForElementToDisplay(WebElement webElement, double timeToWait, TimeUnit unit, long sleepInMillis) { WebDriverWait wait = new WebDriverWait(driver(), asNanos(timeToWait, unit), sleepInMillis); wait.until(ExpectedConditions.visibilityOf(webElement)); }
public WebElement forElementVisible(WebElement element, int timeoutSec, int polling) { changeImplicitWait(250, TimeUnit.MILLISECONDS); try { return new WebDriverWait(driver, timeoutSec, polling).until(ExpectedConditions.visibilityOf( element)); } finally { restoreDeaultImplicitWait(); } }