# 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:Public Protected Private

## Instance Methods

code »addCookie ( name, value, opt_path, opt_domain, opt_isSecure, opt_expiry ) ⇒ `!webdriver.promise.Promise`

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.

code »deleteAllCookies ( ) ⇒ `!webdriver.promise.Promise`

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.

code »deleteCookie ( name ) ⇒ `!webdriver.promise.Promise`

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.

code »getCookie ( name ) ⇒ `!webdriver.promise.Promise`

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.

code »getCookies ( ) ⇒ `!webdriver.promise.Promise`

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.

code »logs ( ) ⇒ `!webdriver.WebDriver.Logs`

Returns
The interface for managing driver logs.

code »timeouts ( ) ⇒ `!webdriver.WebDriver.Timeouts`

Returns
The interface for managing driver timeouts.

code »window ( ) ⇒ `!webdriver.WebDriver.Window`

Returns
The interface for managing the current window.

## Instance Properties

code »driver_ : `!webdriver.WebDriver`