# Class Options

Provides methods for managing browser and driver state.

#### Hierarchy

- Options

#####
Index

### Constructors

constructor

### Methods

addCookie
deleteAllCookies
deleteCookie
getCookie
getCookies
getTimeouts
logs
setTimeouts
window

## Constructors

### constructor

- new Options(driver): Options

- #### Parameters

  - ##### driver: WebDriver

    The parent driver.

  #### Returns Options

## Methods

### addCookie

- addCookie(spec): Promise<void>

- Schedules a command to add a cookie.

  #### Parameters

  - ##### spec: IWebDriverOptionsCookie

    Defines the cookie to add.

  #### Returns Promise<void>

  A promise that will be resolved when the cookie has been added to the page.

  #### Throws

  if any of the cookie parameters are invalid.

  #### Throws

  if `spec` is not a cookie object.

### deleteAllCookies

- deleteAllCookies(): Promise<void>

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

  #### Returns Promise<void>

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

### deleteCookie

- deleteCookie(name): Promise<void>

- 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 Promise<void>

  A promise that will be resolved when the cookie has been deleted.

### getCookie

- getCookie(name): Promise<IWebDriverCookie>

- 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 Promise<IWebDriverCookie>

  A promise that will be resolved with the named cookie, or {@code null} if there is no such cookie.

  #### See

  http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object

### getCookies

- getCookies(): Promise<IWebDriverCookie[]>

- 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 Promise<IWebDriverCookie[]>

  A promise that will be resolved with the cookies visible to the current page.

  #### See

  http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object

### getTimeouts

- getTimeouts(): Promise<ITimeouts>

- The current timeouts

  #### Returns Promise<ITimeouts>

### logs

- logs(): Logs

- #### Returns Logs

  The interface for managing driver logs.

### setTimeouts

- setTimeouts(timeouts): Promise<void>

- Set current timeouts

  #### Parameters

  - ##### timeouts: ITimeouts

  #### Returns Promise<void>

### window

- window(): Window

- #### Returns Window

  The interface for managing the current window.

Generated using TypeDoc