Class Session

Contains information about a WebDriver session.

Index

Constructor methods

Methods

Constructor methods

constructor(id: string, capabilities: Capabilities): Session

constructor

Parameters

  • id: string

    The session ID.

  • capabilities: Capabilities

    The session capabilities.

Returns

Session

constructor(id: string, capabilities: any): Session

Parameters

  • id: string
  • capabilities: any

Returns

Session

Methods

public getCapabilities(): Capabilities

Returns

Capabilities

This session's capabilities.

public getCapability(key: string): any

Retrieves the value of a specific capability.

Parameters

  • key: string

    The capability to retrieve.

Returns

any

The capability value.

public getId(): string

Returns

string

This session's ID.

public toJSON(): string

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

Returns

string

The JSON representation of this Session.