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: WebDriver): <internal>.Options

- #### Parameters

  - ##### driver: WebDriver

    The parent driver.

  #### Returns <internal>.Options

## Methods

### addCookie

- addCookie(spec: IWebDriverOptionsCookie): Promise<void>

- Schedules a command to add a cookie.

  throws

    {error.InvalidArgumentError} if any of the cookie parameters are invalid.

  throws

    {TypeError} if `spec` is not a cookie object.

  #### 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.

### 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: string): 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: string): 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.

  see

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

  #### 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.

### 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.

  see

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

  #### Returns Promise<IWebDriverCookie[]>

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

### getTimeouts

- getTimeouts(): Promise<ITimeouts>

- The current timeouts

  #### Returns Promise<ITimeouts>

### logs

- logs(): Logs

- #### Returns Logs

  The interface for managing driver logs.

### setTimeouts

- setTimeouts(timeouts: ITimeouts): 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