An error appear while working with this code the error is
“The method withTimeout(Duration) in the type FluentWait is not applicable for the arguments (int, TimeUnit)”
Wait wait = new FluentWait(driver) .withTimeout(30, SECONDS) .pollingEvery(5, SECONDS) .ignoring(NoSuchElementException.class);
Advertisement
Answer
This is the correct usage now..
Wait wait = new FluentWait(driver).withTimeout(Duration.ofSeconds(30)).pollingEvery(Duration.ofSeconds(30)) .ignoring(NoSuchElementException.class);