Class webdriver.WebDriver.Options

code »

Provides methods for managing browser and driver state.

Constructor

webdriver.WebDriver.Options ( driver )
Parameters
driver: !webdriver.WebDriver
The parent driver.
Show:

Type Definitions

A JSON description of a browser cookie.

Instance Methods

code »addCookie ( name, value, opt_path, opt_domain, opt_isSecure, opt_expiry )!webdriver.promise.Promise.<void>

Schedules a command to add a cookie.

Parameters
name: string
The cookie name.
value: string
The cookie value.
opt_path: string=
The cookie path.
opt_domain: string=
The cookie domain.
opt_isSecure: boolean=
Whether the cookie is secure.
opt_expiry: (number|!Date)=
When the cookie expires. If specified as a number, should be in milliseconds since midnight, January 1, 1970 UTC.
Returns
A promise that will be resolved when the cookie has been added to the page.

Schedules a command to delete all cookies visible to the current page.

Returns
A promise that will be resolved when all cookies have been deleted.

Schedules a command to delete the cookie with the given name. This command is a no-op if there is no cookie with the given name visible to the current page.

Parameters
name: string
The name of the cookie to delete.
Returns
A promise that will be resolved when the cookie has been deleted.

Schedules a command to retrieve the cookie with the given name. Returns null if there is no such cookie. The cookie will be returned as a JSON object as described by the WebDriver wire protocol.

Parameters
name: string
The name of the cookie to retrieve.
Returns
A promise that will be resolved with the named cookie, or null if there is no such cookie.

Schedules a command to retrieve all cookies visible to the current page. Each cookie will be returned as a JSON object as described by the WebDriver wire protocol.

Returns
A promise that will be resolved with the cookies visible to the current page.
Returns
The interface for managing driver logs.
Returns
The interface for managing driver timeouts.
Returns
The interface for managing the current window.

Instance Properties