@Override public <K extends Throwable> FluentWait<WebDriver, FLUENT> ignoreAll(Collection<Class<? extends K>> types) { wait.ignoreAll(types); return this; }
@Override public <K extends Throwable> FluentWait<WebDriver, FLUENT> ignoreAll(Collection<Class<? extends K>> types) { wait.ignoreAll(types); return this; }
/** * Creates an instance of the {@link FluentWait} with specified {@code timeoutInSec} and ignoring * exception of {@code ignoringExceptionType}. * * @param timeoutInSec waiting time in seconds. * @param ignoredExceptionTypes exceptions which are ignoring during timeout. * @return */ public FluentWait<WebDriver> get( int timeoutInSec, Collection<Class<? extends Throwable>> ignoredExceptionTypes) { return new WebDriverWait(seleniumWebDriver, timeoutInSec).ignoreAll(ignoredExceptionTypes); }
/** * This method enhances Selenium's "until" method. * First it reduces implicit timeout to a near-zero value. * Then a timer is started and the condition is checked cyclically until it is fulfilled * or the timer times out. Finally, implicit timeout is set back to the value * defined in the property file (under {@value com.cognifide.qa.bb.constants.ConfigKeys#TIMINGS_IMPLICIT_TIMEOUT} * * @param condition Selenium's condition object that is queried cyclically inside the wait loop. * @param <T> The function's expected return type. * @return The ExpectedCondition's return value if the function returned something different from null or false before the timeout expired. * @see WebDriverWait#until(Function) */ public <T> T until(ExpectedCondition<T> condition) { try { setImplicitTimeoutToNearZero(); return getWebDriverWait() .ignoreAll(ignoredExceptions) .until(condition); } finally { ignoredExceptions = new ArrayList<>(); timings = new TimingsBuilder().build(); restoreImplicitTimeout(); } }
/** * This method enhances Selenium's "until" method. * First it reduces implicit timeout to a near-zero value. * Then a timer is started and the condition is checked cyclically until it is fulfilled * or the timer times out. Finally, implicit timeout is set back to the value * defined in the property file (under {@value com.cognifide.qa.bb.constants.ConfigKeys#TIMINGS_IMPLICIT_TIMEOUT} * * @param condition Selenium's condition object that is queried cyclically inside the wait loop. * @param <T> The function's expected return type. * @return The ExpectedCondition's return value if the function returned something different from null or false before the timeout expired. * @see WebDriverWait#until(Function) */ public <T> T until(ExpectedCondition<T> condition) { try { setImplicitTimeoutToNearZero(); return getWebDriverWait() .ignoreAll(ignoredExceptions) .until(condition); } finally { ignoredExceptions = new ArrayList<>(); timings = new TimingsBuilder().build(); restoreImplicitTimeout(); } }