-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
Feature and motivation
On this page: https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/#list-downloadable-files
It said:
List Downloadable Files
Be aware that Selenium is not waiting for files to finish downloading, so the list is an immediate snapshot of what file names are currently in the directory for the given session.
Is it possible that Selenium can natively support the function of "wait for files to finish downloading"?
I found a similar issue #10884 but it was closed.
Usage example
I'm using the sample code here: https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs#L69
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5));
wait.Until(d => ((RemoteWebDriver)d).GetDownloadableFiles().Contains(downloadFileName));However, the target file was generated immediately as a 0KB file, and there is another .part file, which is making the wait.Until useless.

Is it possible to provide a feature so we can know the file was completely downloaded?