# Class Options

Class for managing IEDriver specific options.

#### Hierarchy

- Capabilities
  - Options

#####
Index

### Constructors

constructor

### Methods

[serialize]
addArguments
browserAttachTimeout
delete
enableElementCacheCleanup
enablePersistentHover
ensureCleanSession
forceCreateProcessApi
get
getAcceptInsecureCerts
getAlertBehavior
getBrowserName
getBrowserVersion
getPageLoadStrategy
getPlatform
getProxy
has
ignoreZoomSetting
initialBrowserUrl
introduceFlakinessByIgnoringProtectedModeSettings
keys
merge
requireWindowFocus
set
setAcceptInsecureCerts
setAlertBehavior
setBrowserName
setBrowserVersion
setEdgeChromium
setEdgePath
setExtractPath
setHost
setLogFile
setLogLevel
setLoggingPrefs
setPageLoadStrategy
setPlatform
setProxy
silent
usePerProcessProxy
chrome
edge
firefox
ie
safari

## Constructors

### constructor

- new Options(): Options

- #### Returns Options

  Overrides 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(...var_args): Options

- Specifies command-line switches to use when launching Internet Explorer. This is only valid when used with #forceCreateProcessApi.

  #### Parameters

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

    The arguments to add.

  #### Returns Options

  A self reference.

### browserAttachTimeout

- browserAttachTimeout(timeout): Options

- Configures the timeout, in milliseconds, that the driver will attempt to located and attach to a newly opened instance of Internet Explorer. The default is zero, which indicates waiting indefinitely.

  #### Parameters

  - ##### timeout: number

    How long to wait for IE.

  #### 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

### enableElementCacheCleanup

- enableElementCacheCleanup(enable): Options

- Configures whether the driver should attempt to remove obsolete WebElements from its internal cache on page navigation (true by default). Disabling this option will cause the driver to run with a larger memory footprint.

  #### Parameters

  - ##### enable: boolean

    Whether to enable element reference cleanup.

  #### Returns Options

  A self reference.

### enablePersistentHover

- enablePersistentHover(enable): Options

- Configures whether to enable persistent mouse hovering (true by default). Persistent hovering is achieved by continuously firing mouse over events at the last location the mouse cursor has been moved to.

  #### Parameters

  - ##### enable: boolean

    Whether to enable persistent hovering.

  #### Returns Options

  A self reference.

### ensureCleanSession

- ensureCleanSession(cleanSession): Options

- Configures whether to clear the cache, cookies, history, and saved form data before starting the browser. Using this capability will clear session data for all running instances of Internet Explorer, including those started manually.

  #### Parameters

  - ##### cleanSession: boolean

    Whether to clear all session data on startup.

  #### Returns Options

  A self reference.

### forceCreateProcessApi

- forceCreateProcessApi(force): Options

- Configures whether to launch Internet Explorer using the CreateProcess API. If this option is not specified, IE is launched using IELaunchURL, if available. For IE 8 and above, this option requires the TabProcGrowth registry value to be set to 0.

  #### Parameters

  - ##### force: boolean

    Whether to use the CreateProcess API.

  #### Returns Options

  A self reference.

### 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

### ignoreZoomSetting

- ignoreZoomSetting(ignore): Options

- Indicates whether to skip the check that the browser's zoom level is set to 100%.

  #### Parameters

  - ##### ignore: boolean

    Whether to ignore the browser's zoom level settings.

  #### Returns Options

  A self reference.

### initialBrowserUrl

- initialBrowserUrl(url): Options

- Sets the initial URL loaded when IE starts. This is intended to be used with #ignoreProtectedModeSettings to allow the user to initialize IE in the proper Protected Mode zone. Setting this option may cause browser instability or flaky and unresponsive code. Only 'best effort' support is provided when using this option.

  #### Parameters

  - ##### url: string

    The initial browser URL.

  #### Returns Options

  A self reference.

### introduceFlakinessByIgnoringProtectedModeSettings

- introduceFlakinessByIgnoringProtectedModeSettings(ignoreSettings): Options

- Whether to disable the protected mode settings check when the session is created. Disbling this setting may lead to significant instability as the browser may become unresponsive/hang. Only 'best effort' support is provided when using this capability.

  For more information, refer to the IEDriver's required system configuration.

  #### Parameters

  - ##### ignoreSettings: boolean

    Whether to ignore protected mode settings.

  #### 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

### requireWindowFocus

- requireWindowFocus(require): Options

- Configures whether to require the IE window to have input focus before performing any user interactions (i.e. mouse or keyboard events). This option is disabled by default, but delivers much more accurate interaction events when enabled.

  #### Parameters

  - ##### require: boolean

    Whether to require window focus.

  #### Returns Options

  A self reference.

### 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

### 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

### setEdgeChromium

- setEdgeChromium(attachEdgeChromium): Options

- Sets the IEDriver to drive Chromium-based Edge in Internet Explorer mode.

  #### Parameters

  - ##### attachEdgeChromium: boolean

    Whether to run in Chromium-based-Edge in IE mode

  #### Returns Options

  A self reference.

### setEdgePath

- setEdgePath(path): Options

- Sets the path of the EdgeChromium driver.

  #### Parameters

  - ##### path: string

    The EdgeChromium driver path

  #### Returns Options

  A self reference.

### setExtractPath

- setExtractPath(path): Options

- Sets the path of the temporary data directory to use.

  #### Parameters

  - ##### path: string

    The log file path.

  #### Returns Options

  A self reference.

### setHost

- setHost(host): Options

- Sets the IP address of the driver's host adapter.

  #### Parameters

  - ##### host: string

    The IP address to use.

  #### Returns Options

  A self reference.

### setLogFile

- setLogFile(file): Options

- Sets the path to the log file the driver should log to.

  #### Parameters

  - ##### file: string

    The log file path.

  #### Returns Options

  A self reference.

### setLogLevel

- setLogLevel(level): Options

- Sets the IEDriverServer's logging level.

  #### Parameters

  - ##### level: Level

    The logging level.

  #### Returns Options

  A self reference.

### 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

### setProxy

- setProxy(proxy): Options

- Sets the proxy settings for the new session.

  #### Parameters

  - ##### proxy: ProxyConfig

    The proxy configuration to use.

  #### Returns Options

  A self reference.

  Overrides Capabilities.setProxy

### silent

- silent(silent): Options

- Sets whether the driver should start in silent mode.

  #### Parameters

  - ##### silent: boolean

    Whether to run in silent mode.

  #### Returns Options

  A self reference.

### usePerProcessProxy

- usePerProcessProxy(enable): Options

- Configures whether proxies should be configured on a per-process basis. If not set, setting a #setProxy proxy will configure the system proxy. The default behavior is to use the system proxy.

  #### Parameters

  - ##### enable: boolean

    Whether to enable per-process proxy settings.

  #### Returns Options

  A self reference.

### `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