sukanya meruva Answered question
Fluent wait provide additional options such as pollingEvery() and ignoring() for handling wait for element in selenium web driver. pollingEvery() option helps to check for the element in specified time periods and ignoring() helps to ignore any exception found during element identification. We can use fluent wait as mentioned below in selenium and Java
Example script:
WebDriver driver = new ChromeDriver();
driver.get(“https://example.com”);
Wait<WebDriver> wait = new FluentWait<>(driver) .withTimeout(Duration.ofSeconds(20)) .pollingEvery(Duration.ofSeconds(2)) .ignoring(NoSuchElementException.class);
sukanya meruva Answered question