I am trying to use WebDriverWait for condition to be true. If it's not true after timeout, continue - instead of timeout exception.
new WebDriverWait(driver, 10)
.pollingEvery(Duration.ofSeconds(1))
.until(wd -> isElementPresent());
return isElementPresent()
Basically, this element can show up after few seconds delay, and not guaranteed to be there.
- If element is becomes present, return true immediately
- If element is not present, wait up-to 10 seconds, and return false
Can I achieve this with WebDriverWait?