Constructor
new Capabilities(otheropt)
Name | Type | Attributes | Description |
---|---|---|---|
other | Capabilities | | <optional> | Another set of capabilities to initialize this instance from. |
- Source
Members
size
- Source
Methods
delete(key)
Deletes an entry from this set of capabilities.
Name | Type | Description |
---|---|---|
key | string | the capability key to delete. |
- Source
get(key) → {T}
Name | Type | Description |
---|---|---|
key | string | the parameter key to get. |
- Source
the stored parameter value.
- Type:
- T
getAcceptInsecureCerts() → {boolean}
- Source
whether the session is configured to accept insecure TLS certificates.
- Type:
- boolean
getAlertBehavior() → {UserPromptHandler|undefined}
- Source
the behavior pattern for responding to unhandled user prompts, or undefined if not set.
- Type:
- UserPromptHandler |
undefined
getBrowserName() → {string|undefined}
- Source
the configured browser name, or undefined if not set.
- Type:
- string |
undefined
getBrowserVersion() → {string|undefined}
- Source
the configured browser version, or undefined if not set.
- Type:
- string |
undefined
getPageLoadStrategy() → {string|undefined}
Returns the configured page load strategy.
- Source
the page load strategy.
- Type:
- string |
undefined
getPlatform() → {string|undefined}
- Source
the configured platform or undefined if not set.
- Type:
- string |
undefined
getProxy() → {proxy.Config|undefined}
- Source
the configured proxy settings, or undefined if not set.
- Type:
- proxy.
Config |undefined
has(key) → {boolean}
Name | Type | Description |
---|---|---|
key | string | the key to test. |
- Source
whether this capability set has the specified key.
- Type:
- boolean
keys() → (non-null) {Iterator.<string>}
- Source
an iterator of the keys set.
- Type:
- Iterator.<string>
merge(othernon-null) → (non-null) {Capabilities}
Merges another set of capabilities into this instance.
Name | Type | Description |
---|---|---|
other | Capabilities | | The other set of capabilities to merge. |
- Source
A self reference.
- Type:
- Capabilities
set(key, value) → (non-null) {Capabilities}
Name | Type | Description |
---|---|---|
key | string | The capability key. |
value | * | The capability value. |
- Source
If the
key
is not a string.- Type
- TypeError
A self reference.
- Type:
- Capabilities
setAcceptInsecureCerts(accept) → (non-null) {Capabilities}
Sets whether a WebDriver session should implicitly accept self-signed, or other untrusted TLS certificates on navigation.
Name | Type | Description |
---|---|---|
accept | boolean | whether to accept insecure certs. |
- Source
a self reference.
- Type:
- Capabilities
setAlertBehavior(behaviornullable) → (non-null) {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.
Name | Type | Attributes | Description |
---|---|---|---|
behavior | UserPromptHandler | <nullable> | The way WebDriver should respond to unhandled user prompts. |
- Source
A self reference.
- Type:
- Capabilities
setBrowserName(name) → (non-null) {Capabilities}
Sets the name of the target browser.
Name | Type | Description |
---|---|---|
name | Browser | | the browser name. |
- Source
a self reference.
- Type:
- Capabilities
setBrowserVersion(version) → (non-null) {Capabilities}
Sets the desired version of the target browser.
Name | Type | Description |
---|---|---|
version | string | the desired version. |
- Source
a self reference.
- Type:
- Capabilities
setLoggingPrefs(prefs) → (non-null) {Capabilities}
Sets the logging preferences. Preferences may be specified as a ./logging.Preferences instance, or as a map of log-type to log-level.
Name | Type | Description |
---|---|---|
prefs |
- Source
A self reference.
- Type:
- Capabilities
setPageLoadStrategy(strategy) → (non-null) {Capabilities}
Sets the desired page loading strategy for a new WebDriver session.
Name | Type | Description |
---|---|---|
strategy | PageLoadStrategy | the desired strategy. |
- Source
a self reference.
- Type:
- Capabilities
setPlatform(platform) → (non-null) {Capabilities}
Sets the target platform.
Name | Type | Description |
---|---|---|
platform | Platform | | the target platform. |
- Source
a self reference.
- Type:
- Capabilities
setProxy(proxy) → (non-null) {Capabilities}
Sets the proxy configuration for this instance.
Name | Type | Description |
---|---|---|
proxy | proxy. | The desired proxy configuration. |
- Source
A self reference.
- Type:
- Capabilities
setStrictFileInteractability()
Sets the boolean flag configuration for this instance.
- Source
(static) chrome() → (non-null) {Capabilities}
- Source
A basic set of capabilities for Chrome.
- Type:
- Capabilities
(static) edge() → (non-null) {Capabilities}
- Source
A basic set of capabilities for Microsoft Edge.
- Type:
- Capabilities
(static) firefox() → (non-null) {Capabilities}
- Source
A basic set of capabilities for Firefox.
- Type:
- Capabilities
(static) ie() → (non-null) {Capabilities}
- Source
A basic set of capabilities for Internet Explorer.
- Type:
- Capabilities
(static) safari() → (non-null) {Capabilities}
- Source
A basic set of capabilities for Safari.
- Type:
- Capabilities