selenium-webdriver/firefox~ Options

Configuration options for the FirefoxDriver.

Constructor

new Options(otheropt)

Parameters:
NameTypeAttributesDescription
otherCapabilities | Map.<string, ?> | Object<optional>

Another set of capabilities to initialize this instance from.

Methods

addArguments(…args) → (non-null) {Options}

Specify additional command line arguments that should be used when starting the Firefox browser.

Parameters:
NameTypeAttributesDescription
argsstring | !Array.<string><repeatable>

The arguments to include.

Returns:

A self reference.

Type: 
Options

addExtensions(…paths) → (non-null) {Options}

Add extensions that should be installed when starting Firefox.

Parameters:
NameTypeAttributesDescription
pathsstring<repeatable>

The paths to the extension XPI files to install.

Returns:

A self reference.

Type: 
Options

enableBidi() → (non-null) {Capabilities}

Enable bidi connection

Returns:
Type: 
Capabilities

enableDebugger()

Enables moz:debuggerAddress for firefox cdp

enableMobile(androidPackage) → (non-null) {Options}

Enables Mobile start up features

Parameters:
NameTypeDefaultDescription
androidPackagestringorg.mozilla.firefox

The package to use

Returns:

A self reference

Type: 
Options

setBinary(binary) → (non-null) {Options}

Sets the binary to use. The binary may be specified as the path to a Firefox executable.

Parameters:
NameTypeDescription
binarystring

The binary to use.

Throws:

If binary is an invalid type.

Type
TypeError
Returns:

A self reference.

Type: 
Options

setPreference(key, value) → (non-null) {Options}

Parameters:
NameTypeDescription
keystring

the preference key.

valuestring | number | boolean

the preference value.

Throws:

if either the key or value has an invalid type.

Type
TypeError
Returns:

A self reference.

Type: 
Options

setProfile(profile) → (non-null) {Options}

Sets the path to an existing profile to use as a template for new browser sessions. This profile will be copied for each new session - changes will not be applied to the profile itself.

Parameters:
NameTypeDescription
profilestring

The profile to use.

Throws:

if profile is not a string.

Type
TypeError
Returns:

A self reference.

Type: 
Options

windowSize(size) → (non-null) {Options}

Sets the initial window size

Parameters:
NameTypeDescription
sizeObject

The desired window size.

Throws:

if width or height is unspecified, not a number, or less than or equal to 0.

Type
TypeError
Returns:

A self reference.

Type: 
Options