I am trying to interact with a calendar on a webpage, so I am using WebDriver wait.
Below is the method:
new WebDriverWait(driver,Duration.ofSeconds(5)).until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.className("calendar")));
Is something wrong here? The errors are shown as:
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
what is wrong here?