Class for managing MicrosoftEdgeDriver specific options.

### Hierarchy

- Capabilities
  - Options

## Index

### Constructors

- constructor

### Methods

- [serialize]
- addArguments
- addExtensions
- androidActivity
- androidDeviceSerial
- androidEdge
- androidPackage
- androidProcess
- androidUseRunningApp
- delete
- detachDriver
- excludeSwitches
- get
- getAcceptInsecureCerts
- getAlertBehavior
- getBrowserName
- getBrowserVersion
- getPageLoadStrategy
- getPlatform
- getProxy
- has
- headless
- keys
- merge
- set
- setAcceptInsecureCerts
- setAlertBehavior
- setBrowserName
- setBrowserVersion
- setChromeBinaryPath
- setEdgeChromiumBinaryPath
- setEdgeLogFile
- setEdgeMinidumpPath
- setLocalState
- setLoggingPrefs
- setMobileEmulation
- setPageLoadStrategy
- setPerfLoggingPrefs
- setPlatform
- setProxy
- setUserPreferences
- windowSize
- chrome
- edge
- firefox
- fromCapabilities
- ie
- safari

## Constructors

### constructor

- new Options(): <internal>.Options

- Overrides Capabilities.constructor

  #### Returns <internal>.Options

## Methods

### [serialize]

- [serialize](): {}

- Inherited from Capabilities.[serialize]

  suppress

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

  #### Returns {}

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

### addArguments

- addArguments(...var_args: string[]): <internal>.Options

- Add additional command line arguments to use when launching the Edge 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

  - ##### Rest ...var_args: string[]

    The arguments to add.

  #### Returns <internal>.Options

  A self reference.

### addExtensions

- addExtensions(...var_args: any[]): <internal>.Options

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

  #### Parameters

  - ##### Rest ...var_args: any[]

    The extensions to add.

  #### Returns <internal>.Options

  A self reference.

### androidActivity

- androidActivity(name: string): <internal>.Options

- Sets the name of the activity hosting a Edge-based Android WebView. This option must be set to connect to an Android WebView

  #### Parameters

  - ##### name: string

    The activity name.

  #### Returns <internal>.Options

  A self reference.

### androidDeviceSerial

- androidDeviceSerial(serial: string): <internal>.Options

- Sets the device serial number to connect to via ADB. If not specified, the EdgeDriver will select an unused device at random. An error will be returned if all devices already have active sessions.

  #### Parameters

  - ##### serial: string

    The device serial number to connect to.

  #### Returns <internal>.Options

  A self reference.

### androidEdge

- androidEdge(): <internal>.Options

- Configures the EdgeDriver to launch Edge on Android via adb. This function is shorthand for {@link #androidPackage options.androidPackage('com.android.edge')}.

  #### Returns <internal>.Options

  A self reference.

### androidPackage

- androidPackage(pkg: string): <internal>.Options

- Sets the package name of the Edge or WebView app.

  #### Parameters

  - ##### pkg: string

    The package to connect to, or `null` to disable Android and switch back to using desktop Edge.

  #### Returns <internal>.Options

  A self reference.

### androidProcess

- androidProcess(processName: string): <internal>.Options

- Sets the process name of the Activity hosting the WebView (as given by `ps`). If not specified, the process name is assumed to be the same as {@link #androidPackage}.

  #### Parameters

  - ##### processName: string

    The main activity name.

  #### Returns <internal>.Options

  A self reference.

### androidUseRunningApp

- androidUseRunningApp(useRunning: boolean): <internal>.Options

- Sets whether to connect to an already-running instead of the specified {@linkplain #androidProcess app} instead of launching the app with a clean data directory.

  #### Parameters

  - ##### useRunning: boolean

    Whether to connect to a running instance.

  #### Returns <internal>.Options

  A self reference.

### delete

- delete(key: string): boolean

- Inherited from Capabilities.delete

  Deletes an entry from this set of capabilities.

  #### Parameters

  - ##### key: string

    the capability key to delete.

  #### Returns boolean

### detachDriver

- detachDriver(detach: boolean): <internal>.Options

- Sets whether to leave the started Edge browser running if the controlling EdgeDriver service is killed before {@link webdriver.WebDriver#quit()} is called.

  #### Parameters

  - ##### detach: boolean

    Whether to leave the browser running if the edgedriver service is killed before the session.

  #### Returns <internal>.Options

  A self reference.

### excludeSwitches

- excludeSwitches(...var_args: string[]): <internal>.Options

- List of Edge command line switches to exclude that EdgeDriver by default passes when starting Edge. Do not prefix switches with '--'.

  #### Parameters

  - ##### Rest ...var_args: string[]

    The switches to exclude.

  #### Returns <internal>.Options

  A self reference.

### get

- get(key: string): any

- Inherited from Capabilities.get

  #### Parameters

  - ##### key: string

    The capability to return.

  #### Returns any

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

### getAcceptInsecureCerts

- getAcceptInsecureCerts(): boolean

- Inherited from Capabilities.getAcceptInsecureCerts

  #### Returns boolean

  whether the session is configured to accept insecure TLS certificates.

### getAlertBehavior

- getAlertBehavior(): string

- Inherited from Capabilities.getAlertBehavior

  #### Returns string

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

### getBrowserName

- getBrowserName(): string

- Inherited from Capabilities.getBrowserName

  #### Returns string

  the configured browser name, or undefined if not set.

### getBrowserVersion

- getBrowserVersion(): string

- Inherited from Capabilities.getBrowserVersion

  #### Returns string

  the configured browser version, or undefined if not set.

### getPageLoadStrategy

- getPageLoadStrategy(): string

- Inherited from Capabilities.getPageLoadStrategy

  Returns the configured page load strategy.

  #### Returns string

  the page load strategy.

### getPlatform

- getPlatform(): string

- Inherited from Capabilities.getPlatform

  #### Returns string

  the configured platform or undefined if not set.

### getProxy

- getProxy(): ProxyConfig

- Inherited from Capabilities.getProxy

  #### Returns ProxyConfig

  the configured proxy settings, or undefined if not set.

### has

- has(key: string): boolean

- Inherited from Capabilities.has

  #### Parameters

  - ##### key: string

    The capability to check.

  #### Returns boolean

  Whether the specified capability is set.

### headless

- headless(): <internal>.Options

- Configures the edgedriver to start Edge in headless mode.

  > NOTE: Resizing the browser window in headless mode is only supported in Edge 60. Users are encouraged to set an initial window size with the {@link #windowSize windowSize({width, height})} option.

  #### Returns <internal>.Options

  A self reference.

### keys

- keys(): IterableIterator<string>

- Inherited from Capabilities.keys

  #### Returns IterableIterator<string>

  an iterator of the keys set.

### merge

- merge(other: {} | Capabilities | Map<string, any>): Capabilities

- Inherited from Capabilities.merge

  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.

### set

- set(key: string, value: any): Capabilities

- Inherited from Capabilities.set

  throws

    {TypeError} If the `key` is not a string.

  #### Parameters

  - ##### key: string

    The capability key.

  - ##### value: any

    The capability value.

  #### Returns Capabilities

  A self reference.

### setAcceptInsecureCerts

- setAcceptInsecureCerts(accept: boolean): Capabilities

- Inherited from Capabilities.setAcceptInsecureCerts

  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.

### setAlertBehavior

- setAlertBehavior(behavior: string): Capabilities

- Inherited from Capabilities.setAlertBehavior

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

  #### Parameters

  - ##### behavior: string

    The way WebDriver should respond to unhandled user prompts.

  #### Returns Capabilities

  A self reference.

### setBrowserName

- setBrowserName(name: string): Capabilities

- Inherited from Capabilities.setBrowserName

  Sets the name of the target browser.

  #### Parameters

  - ##### name: string

    the browser name.

  #### Returns Capabilities

  a self reference.

### setBrowserVersion

- setBrowserVersion(version: string): Capabilities

- Inherited from Capabilities.setBrowserVersion

  Sets the desired version of the target browser.

  #### Parameters

  - ##### version: string

    the desired version.

  #### Returns Capabilities

  a self reference.

### setChromeBinaryPath

- setChromeBinaryPath(path: string): <internal>.Options

- Sets the path to the Edge binary to use. On Mac OS X, this path should reference the actual Edge executable, not just the application binary (e.g. '/Applications/Google Edge.app/Contents/MacOS/Google Edge').

  The binary path be absolute or relative to the edgedriver server executable, but it must exist on the machine that will launch Edge.

  #### Parameters

  - ##### path: string

    The path to the Edge binary to use.

  #### Returns <internal>.Options

  A self reference.

### setEdgeChromiumBinaryPath

- setEdgeChromiumBinaryPath(path: string): <internal>.Options

- Sets the path to the edge binary to use

  The binary path be absolute or relative to the msedgedriver server executable, but it must exist on the machine that will launch edge chromium.

  #### Parameters

  - ##### path: string

    The path to the edgedriver binary to use.

  #### Returns <internal>.Options

  A self reference.

### setEdgeLogFile

- setEdgeLogFile(path: string): <internal>.Options

- Sets the path to Edge's log file. This path should exist on the machine that will launch Edge.

  #### Parameters

  - ##### path: string

    Path to the log file to use.

  #### Returns <internal>.Options

  A self reference.

### setEdgeMinidumpPath

- setEdgeMinidumpPath(path: string): <internal>.Options

- Sets the directory to store Edge minidumps in. This option is only supported when EdgeDriver is running on Linux.

  #### Parameters

  - ##### path: string

    The directory path.

  #### Returns <internal>.Options

  A self reference.

### setLocalState

- setLocalState(state: any): <internal>.Options

- Sets preferences for the 'Local State' file in Edge's user data directory.

  #### Parameters

  - ##### state: any

    Dictionary of local state preferences.

  #### Returns <internal>.Options

  A self reference.

### setLoggingPrefs

- setLoggingPrefs(prefs: {} | Preferences): Capabilities

- Inherited from Capabilities.setLoggingPrefs

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

  #### Parameters

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

    The logging preferences.

  #### Returns Capabilities

  A self reference.

### setMobileEmulation

- setMobileEmulation(config: any): <internal>.Options

- Configures Edge to emulate a mobile device. For more information, refer to the EdgeDriver project page on [mobile emulation][em]. Configuration options include:

  - `deviceName`: The name of a pre-configured emulated device
  - `width`: screen width, in pixels
  - `height`: screen height, in pixels
  - `pixelRatio`: screen pixel ratio

  Example 1: Using a Pre-configured Device

      let options = new edge.Options().setMobileEmulation(
          {deviceName: 'Google Nexus 5'});

      let driver = new edge.Driver(options);

  Example 2: Using Custom Screen Configuration

      let options = new edge.Options().setMobileEmulation({
          width: 360,
          height: 640,
          pixelRatio: 3.0
      });

      let driver = new edge.Driver(options);

  #### Parameters

  - ##### config: any

  #### Returns <internal>.Options

  A self reference.

### setPageLoadStrategy

- setPageLoadStrategy(strategy: string): Capabilities

- Inherited from Capabilities.setPageLoadStrategy

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

  #### Parameters

  - ##### strategy: string

    the desired strategy.

  #### Returns Capabilities

  a self reference.

### setPerfLoggingPrefs

- setPerfLoggingPrefs(prefs: <internal>.IPerfLoggingPrefs): <internal>.Options

- Sets the performance logging preferences. Options include:

  - `enableNetwork`: Whether or not to collect events from Network domain.
  - `enablePage`: Whether or not to collect events from Page domain.
  - `enableTimeline`: Whether or not to collect events from Timeline domain. Note: when tracing is enabled, Timeline domain is implicitly disabled, unless `enableTimeline` is explicitly set to true.
  - `tracingCategories`: A comma-separated string of Edge tracing categories for which trace events should be collected. An unspecified or empty string disables tracing.
  - `bufferUsageReportingInterval`: The requested number of milliseconds between DevTools trace buffer usage events. For example, if 1000, then once per second, DevTools will report how full the trace buffer is. If a report indicates the buffer usage is 100%, a warning will be issued.

  #### Parameters

  - ##### prefs: <internal>.IPerfLoggingPrefs

  #### Returns <internal>.Options

  A self reference.

### setPlatform

- setPlatform(platform: string): Capabilities

- Inherited from Capabilities.setPlatform

  Sets the target platform.

  #### Parameters

  - ##### platform: string

    the target platform.

  #### Returns Capabilities

  a self reference.

### setProxy

- setProxy(proxy: ProxyConfig): Capabilities

- Inherited from Capabilities.setProxy

  Sets the proxy configuration for this instance.

  #### Parameters

  - ##### proxy: ProxyConfig

    The desired proxy configuration.

  #### Returns Capabilities

  A self reference.

### setUserPreferences

- setUserPreferences(prefs: any): <internal>.Options

- Sets the user preferences for Edge's user profile. See the 'Preferences' file in Edge's user data directory for examples.

  #### Parameters

  - ##### prefs: any

    Dictionary of user preferences to use.

  #### Returns <internal>.Options

  A self reference.

### windowSize

- windowSize(size: { height: number; width: number }): <internal>.Options

- Sets the initial window size.

  throws

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

  #### Parameters

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

    The desired window size.

    - ##### height: number

    - ##### width: number

  #### Returns <internal>.Options

  A self reference.

### Static chrome

- chrome(): Capabilities

- Inherited from Capabilities.chrome

  #### Returns Capabilities

  A basic set of capabilities for Chrome.

### Static edge

- edge(): Capabilities

- Inherited from Capabilities.edge

  #### Returns Capabilities

  A basic set of capabilities for Microsoft Edge.

### Static firefox

- firefox(): Capabilities

- Inherited from Capabilities.firefox

  #### Returns Capabilities

  A basic set of capabilities for Firefox.

### Static fromCapabilities

- fromCapabilities(capabilities: Capabilities): <internal>.Options

- Extracts the EdgeDriver specific options from the given capabilities object.

  #### Parameters

  - ##### capabilities: Capabilities

    The capabilities object.

  #### Returns <internal>.Options

  The EdgeDriver options.

### Static ie

- ie(): Capabilities

- Inherited from Capabilities.ie

  #### Returns Capabilities

  A basic set of capabilities for Internet Explorer.

### Static safari

- safari(): Capabilities

- Inherited from Capabilities.safari

  #### Returns Capabilities

  A basic set of capabilities for Safari.

Generated using TypeDoc