# Class Options

Configuration options for the FirefoxDriver.

#### Hierarchy

- Capabilities
  - Options

#####
Index

### Constructors

constructor

### Methods

[serialize]
addArguments
addExtensions
delete
get
getAcceptInsecureCerts
getAlertBehavior
getBrowserName
getBrowserVersion
getPageLoadStrategy
getPlatform
getProxy
has
headless
keys
merge
set
setAcceptInsecureCerts
setAlertBehavior
setBinary
setBrowserName
setBrowserVersion
setLoggingPrefs
setPageLoadStrategy
setPlatform
setPreference
setProfile
setProxy
useGeckoDriver
windowSize
chrome
edge
firefox
ie
safari

## Constructors

### constructor

- new Options(other?): Options

- #### Parameters

  - ##### `Optional` other: {} | Capabilities | Map<string, any>

    Another set of capabilities to initialize this instance from.

  #### Returns Options

  Inherited from Capabilities.constructor

## Methods

### [serialize]

- [serialize](): {}

- #### Returns {}

  The JSON representation of this instance. Note, the returned object may contain nested promised values.

  #### Suppress

  Suppress [] access on a struct (state inherited from Map).

  Inherited from Capabilities.[serialize]

### addArguments

- addArguments(...args): Options

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

  #### Parameters

  - ##### `Rest` ...args: string[]

    The arguments to include.

  #### Returns Options

  A self reference.

### addExtensions

- addExtensions(...paths): Options

- Add extensions that should be installed when starting Firefox.

  #### Parameters

  - ##### `Rest` ...paths: string[]

    The paths to the extension XPI files to install.

  #### Returns Options

  A self reference.

### delete

- delete(key): boolean

- Deletes an entry from this set of capabilities.

  #### Parameters

  - ##### key: string

    the capability key to delete.

  #### Returns boolean

  Inherited from Capabilities.delete

### get

- get(key): any

- #### Parameters

  - ##### key: string

    The capability to return.

  #### Returns any

  The capability with the given key, or {@code null} if it has not been set.

  Inherited from Capabilities.get

### getAcceptInsecureCerts

- getAcceptInsecureCerts(): boolean

- #### Returns boolean

  whether the session is configured to accept insecure TLS certificates.

  Inherited from Capabilities.getAcceptInsecureCerts

### getAlertBehavior

- getAlertBehavior(): undefined | string

- #### Returns undefined | string

  the behavior pattern for responding to unhandled user prompts, or undefined if not set.

  Inherited from Capabilities.getAlertBehavior

### getBrowserName

- getBrowserName(): undefined | string

- #### Returns undefined | string

  the configured browser name, or undefined if not set.

  Inherited from Capabilities.getBrowserName

### getBrowserVersion

- getBrowserVersion(): undefined | string

- #### Returns undefined | string

  the configured browser version, or undefined if not set.

  Inherited from Capabilities.getBrowserVersion

### getPageLoadStrategy

- getPageLoadStrategy(): undefined | string

- Returns the configured page load strategy.

  #### Returns undefined | string

  the page load strategy.

  Inherited from Capabilities.getPageLoadStrategy

### getPlatform

- getPlatform(): undefined | string

- #### Returns undefined | string

  the configured platform or undefined if not set.

  Inherited from Capabilities.getPlatform

### getProxy

- getProxy(): undefined | ProxyConfig

- #### Returns undefined | ProxyConfig

  the configured proxy settings, or undefined if not set.

  Inherited from Capabilities.getProxy

### has

- has(key): boolean

- #### Parameters

  - ##### key: string

    The capability to check.

  #### Returns boolean

  Whether the specified capability is set.

  Inherited from Capabilities.has

### headless

- headless(): Options

- Configures the geckodriver to start Firefox in headless mode.

  #### Returns Options

  A self reference.

### keys

- keys(): IterableIterator<string, any, any>

- #### Returns IterableIterator<string, any, any>

  an iterator of the keys set.

  Inherited from Capabilities.keys

### merge

- merge(other): Capabilities

- Merges another set of capabilities into this instance.

  #### Parameters

  - ##### other: {} | Capabilities | Map<string, any>

    The other set of capabilities to merge.

  #### Returns Capabilities

  A self reference.

  Inherited from Capabilities.merge

### set

- set(key, value): Capabilities

- #### Parameters

  - ##### key: string

    The capability key.

  - ##### value: any

    The capability value.

  #### Returns Capabilities

  A self reference.

  #### Throws

  If the `key` is not a string.

  Inherited from Capabilities.set

### setAcceptInsecureCerts

- setAcceptInsecureCerts(accept): Capabilities

- Sets whether a WebDriver session should implicitly accept self-signed, or other untrusted TLS certificates on navigation.

  #### Parameters

  - ##### accept: boolean

    whether to accept insecure certs.

  #### Returns Capabilities

  a self reference.

  Inherited from Capabilities.setAcceptInsecureCerts

### setAlertBehavior

- setAlertBehavior(behavior): Capabilities

- Sets the default action to take with an unexpected alert before returning an error. If unspecified, WebDriver will default to UserPromptHandler.DISMISS_AND_NOTIFY.

  #### Parameters

  - ##### behavior: string

    The way WebDriver should respond to unhandled user prompts.

  #### Returns Capabilities

  A self reference.

  Inherited from Capabilities.setAlertBehavior

### setBinary

- setBinary(binary): Options

- Sets the binary to use. The binary may be specified as the path to a Firefox executable, or as a Binary object.

  #### Parameters

  - ##### binary: any

    The binary to use.

  #### Returns Options

  A self reference.

### setBrowserName

- setBrowserName(name): Capabilities

- Sets the name of the target browser.

  #### Parameters

  - ##### name: string

    the browser name.

  #### Returns Capabilities

  a self reference.

  Inherited from Capabilities.setBrowserName

### setBrowserVersion

- setBrowserVersion(version): Capabilities

- Sets the desired version of the target browser.

  #### Parameters

  - ##### version: string

    the desired version.

  #### Returns Capabilities

  a self reference.

  Inherited from Capabilities.setBrowserVersion

### setLoggingPrefs

- setLoggingPrefs(prefs): Capabilities

- Sets the logging preferences. Preferences may be specified as a ./logging.Preferences instance, or as a map of log-type to log-level.

  #### Parameters

  - ##### prefs: {} | Preferences

    The logging preferences.

  #### Returns Capabilities

  A self reference.

  Inherited from Capabilities.setLoggingPrefs

### setPageLoadStrategy

- setPageLoadStrategy(strategy): Capabilities

- Sets the desired page loading strategy for a new WebDriver session.

  #### Parameters

  - ##### strategy: string

    the desired strategy.

  #### Returns Capabilities

  a self reference.

  Inherited from Capabilities.setPageLoadStrategy

### setPlatform

- setPlatform(platform): Capabilities

- Sets the target platform.

  #### Parameters

  - ##### platform: string

    the target platform.

  #### Returns Capabilities

  a self reference.

  Inherited from Capabilities.setPlatform

### setPreference

- setPreference(key, value): Options

- #### Parameters

  - ##### key: string

    the preference key.

  - ##### value: string | number | boolean

    the preference value.

  #### Returns Options

  A self reference.

  #### Throws

  if either the key or value has an invalid type.

### setProfile

- setProfile(profile): Options

- Sets the profile to use. The profile may be specified as a Profile object or as the path to an existing Firefox profile to use as a template.

  #### Parameters

  - ##### profile: string

    The profile to use.

  #### Returns Options

  A self reference.

### setProxy

- setProxy(proxy): Options

- Sets the proxy to use.

  #### Parameters

  - ##### proxy: ProxyConfig

    The proxy configuration to use.

  #### Returns Options

  A self reference.

  Overrides Capabilities.setProxy

### useGeckoDriver

- useGeckoDriver(enable): Options

- Sets whether to use Mozilla's geckodriver to drive the browser. This option is enabled by default and required for Firefox 47+.

  #### Parameters

  - ##### enable: boolean

    Whether to enable the geckodriver.

  #### Returns Options

  #### See

  https://github.com/mozilla/geckodriver

### windowSize

- windowSize(size): Options

- Sets the initial window size when running in #headless headless mode.

  #### Parameters

  - ##### size: {
    height: number;
    width: number;
    }

    The desired window size.

    - ##### height: number

    - ##### width: number

  #### Returns Options

  A self reference.

  #### Throws

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

### `Static` chrome

- chrome(): Capabilities

- #### Returns Capabilities

  A basic set of capabilities for Chrome.

  Inherited from Capabilities.chrome

### `Static` edge

- edge(): Capabilities

- #### Returns Capabilities

  A basic set of capabilities for Microsoft Edge.

  Inherited from Capabilities.edge

### `Static` firefox

- firefox(): Capabilities

- #### Returns Capabilities

  A basic set of capabilities for Firefox.

  Inherited from Capabilities.firefox

### `Static` ie

- ie(): Capabilities

- #### Returns Capabilities

  A basic set of capabilities for Internet Explorer.

  Inherited from Capabilities.ie

### `Static` safari

- safari(): Capabilities

- #### Returns Capabilities

  A basic set of capabilities for Safari.

  Inherited from Capabilities.safari

Generated using TypeDoc