# Class Builder

code »

    webdriver.AbstractBuilder
      └ Builder

Creates new `WebDriver` instances.

## Constructor

Builder ( )
Show:Public Protected Private

## Instance Methods

### Defined in `Builder`

code »build ( ) ⇒ `webdriver.WebDriver`
code »setChromeOptions ( options ) ⇒ `!Builder`

Sets Chrome-specific options for drivers created by this builder.

Parameters
options: `!chrome.Options` The ChromeDriver options to use.
Returns
A self reference.

code »setProxy ( config ) ⇒ `!Builder`

Sets the proxy configuration to use for WebDriver clients created by this builder. Any calls to `#withCapabilities` after this function will overwrite these settings.

Parameters
config: `!proxy.ProxyConfig` The configuration to use.
Returns
A self reference.

### Defined in `webdriver.AbstractBuilder`

code »getCapabilities ( ) ⇒ `!webdriver.Capabilities`

Returns
The current desired capabilities for this builder.

code »getServerUrl ( ) ⇒ `string`

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

code »usingServer ( url ) ⇒ `!webdriver.AbstractBuilder`

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

Parameters
url: `string` URL of the server to use.
Returns
This Builder instance for chain calling.

code »withCapabilities ( capabilities ) ⇒ `!webdriver.AbstractBuilder`

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

Parameters
capabilities: `!(Object|webdriver.Capabilities)` The desired capabilities for a new session.
Returns
This Builder instance for chain calling.

## Instance Properties

### Defined in `webdriver.AbstractBuilder`

code »capabilities_ : `!webdriver.Capabilities`

The desired capabilities to use when creating a new session.

code »serverUrl_ : `string`

URL of the remote server to use for new clients; initialized from the value of the `webdriver.AbstractBuilder.SERVER_URL_ENV` environment variable, but may be overridden using `webdriver.AbstractBuilder#usingServer`.