Class Index | File Index

Classes


Class webdriver.WebDriver.Timeouts


Defined in: webdriver.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
An interface for managing timeout behavior for WebDriver instances.
Method Summary
Method Attributes Method Name and Description
 
Specifies the amount of time the driver should wait when searching for an element if it is not immediately present.
 
Sets the amount of time to wait for a page load to complete before returning an error.
 
Sets the amount of time to wait, in milliseconds, for an asynchronous script to finish execution before returning an error.
Class Detail
webdriver.WebDriver.Timeouts(driver)
An interface for managing timeout behavior for WebDriver instances.
Parameters:
{!webdriver.WebDriver} driver
The parent driver.
Method Detail
{!webdriver.promise.Promise} implicitlyWait(ms)
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 failing with a {@code bot.ErrorCode.NO_SUCH_ELEMENT} error. When searching for multiple elements, the driver should poll the page until at least one element has been found or this timeout has expired.

Setting the wait timeout to 0 (its default value), disables implicit waiting.

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.

Parameters:
{number} ms
The amount of time to wait, in milliseconds.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved when the implicit wait timeout has been set.

{!webdriver.promise.Promise} pageLoadTimeout(ms)
Sets the amount of time to wait for a page load to complete before returning an error. If the timeout is negative, page loads may be indefinite.
Parameters:
{number} ms
The amount of time to wait, in milliseconds.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved when the timeout has been set.

{!webdriver.promise.Promise} setScriptTimeout(ms)
Sets the amount of time to wait, in milliseconds, for an asynchronous script to finish execution before returning an error. If the timeout is less than or equal to 0, the script will be allowed to run indefinitely.
Parameters:
{number} ms
The amount of time to wait, in milliseconds.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved when the script timeout has been set.

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Jan 25 2014 14:42:04 GMT-0500 (EST)