这是有线的问题!我导入的项目运行 100%(几个月前)
今天我已将其与依赖项一起导入,但存在问题WebDriverWait
这是我的代码:
WebDriverWait driverWait = new WebDriverWait(driver, 10000);
driverWait.until(ExpectedConditions.presenceOfElementLocated(By.id("saveBut1")));//here's the issue
这是错误:
no suitable method found for until(ExpectedCondition<WebElement>)
method FluentWait.until(Predicate<WebDriver>) is not applicable
(argument mismatch; ExpectedCondition<WebElement> cannot be converted to Predicate<WebDriver>)
method FluentWait.<V>until(Function<? super WebDriver,V>) is not applicable
(cannot infer type-variable(s) V
(argument mismatch; ExpectedCondition<WebElement> cannot be converted to Function<? super WebDriver,V>))
where V,T are type-variables:
V extends Object declared in method <V>until(Function<? super T,V>)
T extends Object declared in class FluentWait
我使用 Netbeans 作为 IDE,并使用它导出项目(3 个月前)
我也遇到了这个问题,问题是(正如上面评论中所建议的)我缺少 google guava 库,这是 ExpectedCondition 所需要的。一旦我将其添加到项目中,它就会按预期进行编译。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)