0

我正在尝试与网页上的日历进行交互,因此我正在使用 WebDriver 等待。

下面是方法:

new WebDriverWait(driver,Duration.ofSeconds(5)).until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.className("calendar")));

这里有什么问题吗?错误显示为:

Multiple markers at this line
    - Duration cannot be resolved or is not a field
    - Syntax error on token ",", . expected
    - The constructor WebDriverWait(WebDriver, Duration) is 
     undefined

这里有什么问题?

4

0 回答 0