From 6d8328aed9667269ce9fd0088620b5c6489a47ff Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Sat, 9 Dec 2023 12:49:16 +0300 Subject: [PATCH] Align download timeout with java 5 secs --- examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs b/examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs index 84e15f69a771..203499f6ebb7 100644 --- a/examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs +++ b/examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs @@ -60,13 +60,14 @@ public void Downloads() { EnableDownloads = true }; + driver = new RemoteWebDriver(GridUrl, options); driver.Url = "https://selenium.dev/selenium/web/downloads/download.html"; driver.FindElement(By.Id("file-1")).Click(); driver.FindElement(By.Id("file-2")).Click(); - WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3)); - wait.Until(d => ((RemoteWebDriver)d).GetDownloadableFiles().Any(f => f == "file_2.jpg")); + WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5)); + wait.Until(d => ((RemoteWebDriver)d).GetDownloadableFiles().Contains("file_2.jpg")); IReadOnlyList names = ((RemoteWebDriver)driver).GetDownloadableFiles();