Once clicking a download button, files will be downloaded. Before executing next code, it needs to wait until the download completes.
My code looks like this:
<
The below code is working fine for me.
Also no warning will be as I used Generic type and Duration as recommended.
File file = new File("C:\chromedriver_win32.zip"); FluentWait wait = new FluentWait(driver).withTimeout(Duration.ofSeconds(25)).pollingEvery(Duration.ofMillis(100)); wait.until( x -> file.exists());