使用此代码时出现错误,错误是
"The method withTimeout(Duration) in the type FluentWait is not applicable for the arguments (int, TimeUnit)"
Wait wait = new FluentWait(driver)
.withTimeout(30, SECONDS)
.pollingEvery(5, SECONDS)
.ignoring(NoSuchElementException.class);
最佳答案
这是现在的正确用法..
Wait wait = new FluentWait(driver).withTimeout(Duration.ofSeconds(30)).pollingEvery(Duration.ofSeconds(30))
.ignoring(NoSuchElementException.class);
关于java - fluidwait<webdriver> 类型中的 withtimeout(duration) 方法不适用于参数 (int, timeunit),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58327038/