Open
Description
Feature and motivation
Often times, when using WebDriverWait
, we want to specify a custom sleep interval. However, it requires users to use the WebDriverWait(IClock clock, IWebDriver driver, TimeSpan timeout, TimeSpan sleepInterval)
constructor overload, and users must learn about the IClock
interface.
We can add a constructor WebDriverWait(IWebDriver driver, TimeSpan timeout, TimeSpan sleepInterval)
which allows users to specify only the values they need.
The Java binding already has this overload
selenium/java/src/org/openqa/selenium/support/ui/WebDriverWait.java
Lines 61 to 63 in d77c827
Usage example
var wait = new WebDriverWait(driver, timeout: TimeSpan.FromSeconds(15), sleepInterval: TimeSpan.FromSeconds(1));
IWebElement element = wait.Until(driver => driver.FindElement(By.Name("q")));
Activity