Module: selenium-webdriver/opera
View Source

# class Options

    webdriver.Serializable
      └ Options

Class for managing `OperaDriver` specific options.

## Instance Methods

### addArguments(var_args)code »

Add additional command line arguments to use when launching the Opera browser. Each argument may be specified with or without the "--" prefix (e.g. "--foo" and "foo"). Arguments with an associated value should be delimited by an "=": "foo=bar".

Parameters

var_args`...(string|Array<string>)`

  The arguments to add.

Returns

`Options`

  A self reference.

### addExtensions(var_args)code »

Add additional extensions to install when launching Opera. Each extension should be specified as the path to the packed CRX file, or a Buffer for an extension.

Parameters

var_args`...(string|Buffer|Array<(string|Buffer)>)`

  The extensions to add.

Returns

`Options`

  A self reference.

### serialize()code »

Converts this instance to its JSON wire protocol representation. Note this function is an implementation not intended for general use.

Overrides: webdriver.Serializable

Returns

> , localState: (Object|undefined), logPath: (string|undefined), prefs: (Object|undefined)}} The JSON wire protocol representation of this instance.

### setLoggingPrefs(prefs)code »

Sets the logging preferences for the new session.

Parameters

prefs`webdriver.logging.Preferences`

  The logging preferences.

Returns

`Options`

  A self reference.

### setOperaBinaryPath(path)code »

Sets the path to the Opera binary to use. On Mac OS X, this path should reference the actual Opera executable, not just the application binary. The binary path be absolute or relative to the operadriver server executable, but it must exist on the machine that will launch Opera.

Parameters

path`string`

  The path to the Opera binary to use.

Returns

`Options`

  A self reference.

### setProxy(proxy)code »

Sets the proxy settings for the new session.

Parameters

proxy`selenium-webdriver.ProxyConfig`

  The proxy configuration to use.

Returns

`Options`

  A self reference.

### toCapabilities(opt_capabilities)code »

Converts this options instance to a `webdriver.Capabilities` object.

Parameters

opt_capabilities`?Capabilities=`

  The capabilities to merge these options into, if any.

Returns

`webdriver.Capabilities`

  The capabilities.

## Static Functions

### Options.fromCapabilities(capabilities)code »

Extracts the OperaDriver specific options from the given capabilities object.

Parameters

capabilities`webdriver.Capabilities`

  The capabilities object.

Returns

`Options`

  The OperaDriver options.