我尝试在脚本中添加显式等待,但收到以下错误
"The type com.google.common.base.Function cannot be resolved. It is indirectly referenced from required .class files"
我的代码
WebElement okButton;
okButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//button[@id='buttonResolveResultOk']")));
最佳答案
我将 Guava 更新到最新版本,这帮助我解决了这个问题
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
</dependency>
关于java - 无法实现显式等待,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48561341/