Module: selenium-webdriver
View Source

# class Session

Alias for `webdriver.Session`

Contains information about a WebDriver session.

## new Session(id, capabilities)

Parameters

id`string`

  The session ID.

capabilities`Object`

  The session capabilities.

## Instance Methods

### getCapabilities()code »

Returns

`webdriver.Capabilities`

  This session's capabilities.

### getCapability(key)code »

Retrieves the value of a specific capability.

Parameters

key`string`

  The capability to retrieve.

Returns

The capability value.

### getId()code »

Returns

`string`

  This session's ID.

### toJSON(arg0)code »

Returns the JSON representation of this object, which is just the string session ID.

Parameters

arg0`string=`

Returns

`string`

  The JSON representation of this Session.