:型待ちで(機能)までのメソッドは、引数には適用されません(新しい関数(){})セレンwebdriverをして私のコードをコンパイルしている間、私はこのエラーを得た
@BeforeClass setUp java.lang.Error: Unresolved compilation problems: The method until(Function) in the type Wait is not applicable for the arguments (new Function(){}) Function cannot be resolved to a type
私のコードは次のとおりです。
Wait wait = new FluentWait(driver)
.withTimeout(30, SECONDS)
.pollingEvery(5, SECONDS)
.ignoring(NoSuchElementException.class);
WebElement myLoginButton = wait.until(
new Function() {
public WebElement apply(WebDriver driver) {
return driver.findElement(By.id("btnLogin"));
}
}
)
コードを見ると、達成しようとしていることを判断するのが少し難しいです。このブロックに関連する共有していないコードがありますか? 'new Function(){ public WebElement apply(WebDriver driver){ return driver.findElement(By.id(" btnLogin ")); } ' – Reezo