View Source

# module selenium-webdriver/proxy

Defines functions for configuring a webdriver proxy:

    var webdriver = require('selenium-webdriver'),
        proxy = require('selenium-webdriver/proxy');

    var driver = new webdriver.Builder()
        .withCapabilities(webdriver.Capabilities.chrome())
        .setProxy(proxy.manual({http: 'host:1234'}))
        .build();

## Functions

### direct()code »

Configures WebDriver to bypass all browser proxies.

Returns

`{proxyType: string}`

  A new proxy configuration object.

### manual(options)code »

Manually configures the browser proxy. The following options are supported:

- `ftp`: Proxy host to use for FTP requests
- `http`: Proxy host to use for HTTP requests
- `https`: Proxy host to use for HTTPS requests
- `bypass`: A list of hosts requests should directly connect to, bypassing any other proxies for that request. May be specified as a comma separated string, or a list of strings.

Behavior is undefined for FTP, HTTP, and HTTPS requests if the corresponding key is omitted from the configuration options.

Parameters

options`{bypass: (string|Array<string>|undefined), ftp: (string|undefined), http: (string|undefined), https: (string|undefined)}`

  Proxy configuration options.

Returns

`{proxyType: string}`

  A new proxy configuration object.

### pac(url)code »

Configures WebDriver to configure the browser proxy using the PAC file at the given URL.

Parameters

url`string`

  URL for the PAC proxy to use.

Returns

`{proxyType: string}`

  A new proxy configuration object.

### system()code »

Configures WebDriver to use the current system's proxy.

Returns

`{proxyType: string}`

  A new proxy configuration object.