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
github-actions commentedon Feb 20, 2025
@RenderMichael, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then
I-issue-template
label.If the issue is a question, add the
I-question
label.If the issue is valid but there is no time to troubleshoot it, consider adding the
help wanted
label.If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable
G-*
label, and it will provide the correct link and auto-close the issue.After troubleshooting the issue, please add the
R-awaiting answer
label.Thank you!
nvborisenko commentedon Feb 20, 2025
Support
package which is not supported... I think long-term plans just to remove this package:RenderMichael commentedon Feb 20, 2025
WebDriverWait
is in the support namespace of the normalWebDriver
package. I'm not sure what the policy is there.Also, support is very very much widely used. We could consider it "feature-complete" and avoid unnecessary development, but removing it will be even more painful than removing
GetAttribute
in my estimation.nvborisenko commentedon Feb 23, 2025
I suppose it is leftovers of big deprecation, @jimevans is it right?
SystemClock
singleton #15285selenium-ci commentedon Jun 1, 2025
Hi, @RenderMichael.
This is related to code in the Support packages. The support packages contain example code that
many users find helpful, but they do not necessarily represent the best practices for using Selenium,
and the Selenium team is not prioritizing work on them right now.
This doesn't mean that we won't ever work on them, but it is not on our roadmap as we push to release Selenium 5.
We actively encourage people to create their own wrapper and helper code that makes sense for them.
If you have any questions, please contact us
WebDriverWait
constructor for specifying a sleep interval without a clock #15838