Class Builder

extends

{webdriver.AbstractBuilder}

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(): Builder

constructor

Returns

Builder

Methods

public build(): WebDriver

override

Returns

WebDriver

public getCapabilities(): Capabilities

Returns

Capabilities

The current desired capabilities for this builder.

public getServerUrl(): string

Returns

string

The URL of the WebDriver server this instance is configured to use.

public getSession(): string

Returns

string

The ID of the session, if any, this builder is configured to reuse.

public usingServer(url: string): AbstractBuilder

Configures which WebDriver server should be used for new sessions. Overrides the value loaded from the {@link webdriver.AbstractBuilder.SERVER_URL_ENV} upon creation of this instance.

Parameters

  • url: string

    URL of the server to use.

Returns

AbstractBuilder

This Builder instance for chain calling.

public usingSession(id: string): AbstractBuilder

Configures the builder to create a client that will use an existing WebDriver session.

Parameters

  • id: string

    The existing session ID to use.

Returns

AbstractBuilder

This Builder instance for chain calling.

public withCapabilities(capabilities: Capabilities): AbstractBuilder

Sets the desired capabilities when requesting a new session. This will overwrite any previously set desired capabilities.

Parameters

  • capabilities: Capabilities

    The desired capabilities for a new session.

Returns

AbstractBuilder

This Builder instance for chain calling.

public withCapabilities(capabilities: any): AbstractBuilder

Parameters

  • capabilities: any

Returns

AbstractBuilder