Class webdriver.Capabilities

code »

Constructor

webdriver.Capabilities ( opt_other )
Parameters
opt_other: (webdriver.Capabilities|Object)=
Another set of capabilities to merge into this instance.
Show:

Instance Methods

code »get ( key )*
Parameters
key: string
The capability to return.
Returns
The capability with the given key, or null if it has not been set.
code »has ( key )boolean
Parameters
key: string
The capability to check.
Returns
Whether the specified capability is set.

Merges another set of capabilities into this instance. Any duplicates in the provided set will override those already set on this instance.

Parameters
other: !(webdriver.Capabilities|Object)
The capabilities to merge into this instance.
Returns
A self reference.
Parameters
key: string
The capability to set.
value: *
The capability value. Capability values must be JSON serializable. Pass null to unset the capability.
Returns
A self reference.

Sets the default action to take with an unexpected alert before returning an error.

Parameters
behavior: string
The desired behavior; should be "accept", "dismiss", or "ignore". Defaults to "dismiss".
Returns
A self reference.

Sets whether native events should be used.

Parameters
enabled: boolean
Whether to enable native events.
Returns
A self reference.

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

Parameters
prefs: !(webdriver.logging.Preferences|Object.<string, string>)
The logging preferences.
Returns
A self reference.

Sets the proxy configuration for this instance.

Parameters
proxy: webdriver.ProxyConfig
The desired proxy configuration.
Returns
A self reference.

Sets how elements should be scrolled into view for interaction.

Parameters
behavior: number
The desired scroll behavior: either 0 to align with the top of the viewport or 1 to align with the bottom.
Returns
A self reference.
Returns
The JSON representation of this instance.

Instance Properties

Static Functions

Returns
A basic set of capabilities for Android.
Returns
A basic set of capabilities for Chrome.
Returns
A basic set of capabilities for Firefox.
Returns
A basic set of capabilities for HTMLUnit.
Returns
A basic set of capabilities for HTMLUnit with enabled Javascript.
Returns
A basic set of capabilities for Internet Explorer.
Returns
A basic set of capabilities for iPad.
Returns
A basic set of capabilities for iPhone.
Returns
A basic set of capabilities for Opera.
Returns
A basic set of capabilities for PhantomJS.
Returns
A basic set of capabilities for Safari.