WebDriverWait ClassWebDriver
Provides the ability to wait for an arbitrary condition during test execution.
Inheritance Hierarchy


Namespace: OpenQA.Selenium.Support.UI
Assembly: WebDriver.Support (in WebDriver.Support.dll) Version: 3.1.0

public class WebDriverWait : DefaultWait<IWebDriver>

The WebDriverWait type exposes the following members.


Public methodWebDriverWait(IWebDriver, TimeSpan)
Initializes a new instance of the WebDriverWait class.
Public methodWebDriverWait(IClock, IWebDriver, TimeSpan, TimeSpan)
Initializes a new instance of the WebDriverWait class.

Public propertyMessage
Gets or sets the message to be displayed when time expires.
(Inherited from DefaultWaitT.)
Public propertyPollingInterval
Gets or sets how often the condition should be evaluated. The default timeout is 500 milliseconds.
(Inherited from DefaultWaitT.)
Public propertyTimeout
Gets or sets how long to wait for the evaluated condition to be true. The default timeout is 500 milliseconds.
(Inherited from DefaultWaitT.)

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIgnoreExceptionTypes
Configures this instance to ignore specific types of exceptions while waiting for a condition. Any exceptions not whitelisted will be allowed to propagate, terminating the wait.
(Inherited from DefaultWaitT.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodThrowTimeoutException
Throws a WebDriverTimeoutException with the given message.
(Inherited from DefaultWaitT.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodUntilTResult
Repeatedly applies this instance's input value to the given function until one of the following occurs:

  • the function returns neither null nor false
  • the function throws an exception that is not in the list of ignored exception types
  • the timeout expires

(Inherited from DefaultWaitT.)

IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3))
IWebElement element = wait.Until(driver => driver.FindElement(By.Name("q")));
See Also