我想等待我的线程,直到元素不存在或隐藏。尝试这样的代码
new WebDriverWait(driver, TIME_OUT_SECS).until(new ExpectedCondition<WebElement>() {
@Override
public Boolean apply(WebDriver d) {
return !d.findElement(by).isDisplayed();
}
});
但出现错误
attempting to use incompatible return type