selenium - selenium WebDriverWait.Untils NoSuchMethodError
问题描述
在我的 selenium webdriver 中,我正在尝试使用 WebDriverWait.Untils 但它失败了,我收到如下错误:
java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;
我的代码:
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//button[@id='btn-generalInfo']//span[1]"))).click();
我的 pom.xml 是
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
解决方案
推荐阅读
- python - 是否有列表框的替代小部件?
- python - 使用 utf-8 在 python 中打印乌尔都语
- angular - 如何嵌入没有 CORS 问题的 Angular 应用程序
- django - 为包含对象的 django 模型提供服务
- reactjs - 我如何使用 Promise 对象
- python - 把我的for循环变成python中的一个函数
- c# - Viewbag 没有将回发的值绑定到控制器?
- spring-boot - 如何在 Spring Boot 应用程序中为嵌入式 tomcat 启用 jmx
- python - 刷新的对象是从数据库事务缓冲区返回还是从 SQLAlchemy 中的内存表示返回?
- php - Laravel 应用程序的配置何时初始化?或者当 DB::connection 设置时?