我想等到一个js脚本返回true,我正在使用的代码没有编译并抛出错误
is not abstract and does not override abstract method apply(Object) in Function
这是代码
WebDriverWait wait = new WebDriverWait(driver, 10);
boolean isFound = wait.until(new ExpectedCondition(){ //here ERROR
public Boolean apply(WebDriver d){
JavascriptExecutor js = (JavascriptExecutor) d;
return (Boolean) js.executeScript("return true");
}
});
我试图从 http://www.tarnowski.se/2011/09/11/converting-selenium-waitforcondition-to-webdriverwait/复制代码