Package org.openqa.selenium.remote
Class RemoteWebDriver.RemoteWebDriverOptions.RemoteTimeouts
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions.RemoteTimeouts
-
- All Implemented Interfaces:
WebDriver.Timeouts
- Enclosing class:
- RemoteWebDriver.RemoteWebDriverOptions
protected class RemoteWebDriver.RemoteWebDriverOptions.RemoteTimeouts extends java.lang.Object implements WebDriver.Timeouts
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RemoteTimeouts()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.time.Duration
getImplicitWaitTimeout()
Gets the amount of time the driver should wait when searching for an element if it is not immediately present.java.time.Duration
getPageLoadTimeout()
Gets the amount of time to wait for a page load to complete before throwing an error.java.time.Duration
getScriptTimeout()
Gets the amount of time to wait for an asynchronous script to finish execution before throwing an error.WebDriver.Timeouts
implicitlyWait(long time, java.util.concurrent.TimeUnit unit)
Deprecated.WebDriver.Timeouts
implicitlyWait(java.time.Duration duration)
Specifies the amount of time the driver should wait when searching for an element if it is not immediately present.WebDriver.Timeouts
pageLoadTimeout(long time, java.util.concurrent.TimeUnit unit)
Deprecated.WebDriver.Timeouts
pageLoadTimeout(java.time.Duration duration)
Sets the amount of time to wait for a page load to complete before throwing an error.WebDriver.Timeouts
scriptTimeout(java.time.Duration duration)
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.WebDriver.Timeouts
setScriptTimeout(long time, java.util.concurrent.TimeUnit unit)
Deprecated.WebDriver.Timeouts
setScriptTimeout(java.time.Duration duration)
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.
-
-
-
Method Detail
-
implicitlyWait
@Deprecated public WebDriver.Timeouts implicitlyWait(long time, java.util.concurrent.TimeUnit unit)
Deprecated.- Specified by:
implicitlyWait
in interfaceWebDriver.Timeouts
- Parameters:
time
- The amount of time to wait.unit
- The unit of measure fortime
.- Returns:
- A self reference.
-
implicitlyWait
public WebDriver.Timeouts implicitlyWait(java.time.Duration duration)
Description copied from interface:WebDriver.Timeouts
Specifies the amount of time the driver should wait when searching for an element if it is not immediately present.When searching for a single element, the driver should poll the page until the element has been found, or this timeout expires before throwing a
NoSuchElementException
. When searching for multiple elements, the driver should poll the page until at least one element has been found or this timeout has expired.Increasing the implicit wait timeout should be used judiciously as it will have an adverse effect on test run time, especially when used with slower location strategies like XPath.
If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid argument will be returned.
- Specified by:
implicitlyWait
in interfaceWebDriver.Timeouts
- Parameters:
duration
- The duration to wait.- Returns:
- A self reference.
-
getImplicitWaitTimeout
public java.time.Duration getImplicitWaitTimeout()
Description copied from interface:WebDriver.Timeouts
Gets the amount of time the driver should wait when searching for an element if it is not immediately present.- Specified by:
getImplicitWaitTimeout
in interfaceWebDriver.Timeouts
- Returns:
- The amount of time the driver should wait when searching for an element.
- See Also:
- W3C WebDriver
-
setScriptTimeout
@Deprecated public WebDriver.Timeouts setScriptTimeout(long time, java.util.concurrent.TimeUnit unit)
Deprecated.- Specified by:
setScriptTimeout
in interfaceWebDriver.Timeouts
- Parameters:
time
- The timeout value.unit
- The unit of time.- Returns:
- A self reference.
- See Also:
JavascriptExecutor.executeAsyncScript(String, Object...)
, W3C WebDriver, W3C WebDriver
-
setScriptTimeout
public WebDriver.Timeouts setScriptTimeout(java.time.Duration duration)
Description copied from interface:WebDriver.Timeouts
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid argument will be returned.- Specified by:
setScriptTimeout
in interfaceWebDriver.Timeouts
- Parameters:
duration
- The timeout value.- Returns:
- A self reference.
- See Also:
JavascriptExecutor.executeAsyncScript(String, Object...)
, W3C WebDriver, W3C WebDriver
-
scriptTimeout
public WebDriver.Timeouts scriptTimeout(java.time.Duration duration)
Description copied from interface:WebDriver.Timeouts
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid argument will be returned.- Specified by:
scriptTimeout
in interfaceWebDriver.Timeouts
- Parameters:
duration
- The timeout value.- Returns:
- A self reference.
- See Also:
JavascriptExecutor.executeAsyncScript(String, Object...)
, W3C WebDriver, W3C WebDriver
-
getScriptTimeout
public java.time.Duration getScriptTimeout()
Description copied from interface:WebDriver.Timeouts
Gets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid argument will be returned.- Specified by:
getScriptTimeout
in interfaceWebDriver.Timeouts
- Returns:
- The amount of time to wait for an asynchronous script to finish execution.
- See Also:
- W3C WebDriver, W3C WebDriver
-
pageLoadTimeout
@Deprecated public WebDriver.Timeouts pageLoadTimeout(long time, java.util.concurrent.TimeUnit unit)
Deprecated.- Specified by:
pageLoadTimeout
in interfaceWebDriver.Timeouts
- Parameters:
time
- The timeout value.unit
- The unit of time.- Returns:
- A Timeouts interface.
- See Also:
- W3C WebDriver, W3C WebDriver
-
pageLoadTimeout
public WebDriver.Timeouts pageLoadTimeout(java.time.Duration duration)
Description copied from interface:WebDriver.Timeouts
Sets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid argument will be returned.- Specified by:
pageLoadTimeout
in interfaceWebDriver.Timeouts
- Parameters:
duration
- The timeout value.- Returns:
- A Timeouts interface.
- See Also:
- W3C WebDriver, W3C WebDriver
-
getPageLoadTimeout
public java.time.Duration getPageLoadTimeout()
Description copied from interface:WebDriver.Timeouts
Gets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid argument will be returned.- Specified by:
getPageLoadTimeout
in interfaceWebDriver.Timeouts
- Returns:
- The amount of time to wait for a page load to complete.
- See Also:
- W3C WebDriver, W3C WebDriver
-
-