class Capabilities
webdriver.Serializable<Object<string, ?>> └ Capabilities
- Alias for
webdriver.Capabilities
new Capabilities(opt_other)
- opt_other
?Object=
Another set of capabilities to merge into this instance.
Instance Methods
merge(other)code »
Merges another set of capabilities into this instance. Any duplicates in the provided set will override those already set on this instance.
- other
Object
The capabilities to merge into this instance.
webdriver.Capabilities
A self reference.
serialize()code »
Returns either this instance's serialized represention, if immediately
available, or a promise for its serialized representation. This function is
conceptually equivalent to objects that have a toJSON()
property,
except the serialize() result may be a promise or an object containing a
promise (which are not directly JSON friendly).
Overrides: webdriver.Serializable
set(key, value)code »
- key
string
The capability to set.
- value
*
The capability value. Capability values must be JSON serializable. Pass
null
to unset the capability.
webdriver.Capabilities
A self reference.
setAlertBehavior(behavior)code »
Sets the default action to take with an unexpected alert before returning an error.
- behavior
string
The desired behavior; should be "accept", "dismiss", or "ignore". Defaults to "dismiss".
webdriver.Capabilities
A self reference.
setEnableNativeEvents(enabled)code »
Sets whether native events should be used.
- enabled
boolean
Whether to enable native events.
webdriver.Capabilities
A self reference.
setLoggingPrefs(prefs)code »
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.
- prefs
(webdriver.logging.Preferences|Object<string, string>)
The logging preferences.
webdriver.Capabilities
A self reference.
setProxy(proxy)code »
Sets the proxy configuration for this instance.
- proxy
{proxyType: string}
The desired proxy configuration.
webdriver.Capabilities
A self reference.
setScrollBehavior(behavior)code »
Sets how elements should be scrolled into view for interaction.
- behavior
number
The desired scroll behavior: either 0 to align with the top of the viewport or 1 to align with the bottom.
webdriver.Capabilities
A self reference.
Static Functions
Capabilities.android()code »
webdriver.Capabilities
A basic set of capabilities for Android.
Capabilities.chrome()code »
webdriver.Capabilities
A basic set of capabilities for Chrome.
Capabilities.firefox()code »
webdriver.Capabilities
A basic set of capabilities for Firefox.
Capabilities.htmlunit()code »
webdriver.Capabilities
A basic set of capabilities for HTMLUnit.
Capabilities.htmlunitwithjs()code »
webdriver.Capabilities
A basic set of capabilities for HTMLUnit with enabled Javascript.
Capabilities.ie()code »
webdriver.Capabilities
A basic set of capabilities for Internet Explorer.
Capabilities.ipad()code »
webdriver.Capabilities
A basic set of capabilities for iPad.
Capabilities.iphone()code »
webdriver.Capabilities
A basic set of capabilities for iPhone.
Capabilities.opera()code »
webdriver.Capabilities
A basic set of capabilities for Opera.
Capabilities.phantomjs()code »
webdriver.Capabilities
A basic set of capabilities for PhantomJS.
Capabilities.safari()code »
webdriver.Capabilities
A basic set of capabilities for Safari.