[英]WebDriverWait wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(by)) not working with Selenium 3.4.0
WebDriverWait wait = new WebDriverWait(driver, timoutInSeconds);
List<WebElement> elements =
wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(by));
Its a maven project, I have upgraded to selenium 3.4.0 version from 2.53.0 and added dependency of guava with 21.0 version. 它是一个maven项目,我已经从2.53.0升级到硒3.4.0版本,并在21.0版本中添加了番石榴的依赖性。 Earlier all waits were working.
早先所有的等待都在起作用。 When upgraded to latest selenium 3.4.0 version, all waits are breaking.
当升级到最新的硒3.4.0版本时,所有等待都中断了。 Below error is received when executed tests.
执行测试时收到以下错误。
java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Ljava/util/function/Function;)Ljava/lang/Object;
java.lang.NoSuchMethodError:org.openqa.selenium.support.ui.WebDriverWait.until(Ljava / util / function / Function;)Ljava / lang / Object;
Many users says adding Guava dependency this issue no longer exists, But I am seeing this issue even after adding Guava dependency. 许多用户说添加Guava依赖关系不再存在此问题,但是即使添加了Guava依赖关系,我仍然看到此问题。
Look at the third comment in this one WebDriverWait.until no longer available in Selenium-java-3.2 and Selenium-java-3.3 releases 查看此WebDriverWait.until中的第三条评论,直到Selenium-java-3.2和Selenium-java-3.3发行版中不再可用
I added the guava dependency + now using fluent wait and it's working fine 我添加了番石榴依赖+现在使用流畅的等待并且它工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.