Skip to content

Commit

Permalink
Align download timeout with java 5 secs
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Dec 9, 2023
1 parent 561c888 commit 6d8328a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/dotnet/SeleniumDocs/Drivers/RemoteWebDriverTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> names = ((RemoteWebDriver)driver).GetDownloadableFiles();

Expand Down

0 comments on commit 6d8328a

Please sign in to comment.