Add additional command line arguments to use when launching the Chrome 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'.
Rest
...var_args: string[]The arguments to add.
A self reference.
Sets the name of the activity hosting a Chrome-based Android WebView. This option must be set to connect to an Android WebView
The activity name.
A self reference.
Sets the device serial number to connect to via ADB. If not specified, the ChromeDriver will select an unused device at random. An error will be returned if all devices already have active sessions.
The device serial number to connect to.
A self reference.
Sets whether to leave the started Chrome browser running if the controlling ChromeDriver service is killed before () is called.
Whether to leave the browser running if the chromedriver service is killed before the session.
A self reference.
the configured proxy settings, or undefined if not set.
Configures the chromedriver to start Chrome in headless mode.
NOTE: Resizing the browser window in headless mode is only supported in Chrome 60. Users are encouraged to set an initial window size with the #windowSize windowSize({width, height)} option.
A self reference.
an iterator of the keys set.
Merges another set of capabilities into this instance.
The other set of capabilities to merge.
A self reference.
The capability key.
The capability value.
A self reference.
If the key
is not a string.
Sets whether a WebDriver session should implicitly accept self-signed, or other untrusted TLS certificates on navigation.
whether to accept insecure certs.
a self reference.
Sets the default action to take with an unexpected alert before returning an error. If unspecified, WebDriver will default to UserPromptHandler.DISMISS_AND_NOTIFY.
The way WebDriver should respond to unhandled user prompts.
A self reference.
Sets the name of the target browser.
the browser name.
a self reference.
Sets the desired version of the target browser.
the desired version.
a self reference.
Sets the path to the Chrome binary to use. On Mac OS X, this path should reference the actual Chrome executable, not just the application binary (e.g. '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome').
The binary path be absolute or relative to the chromedriver server executable, but it must exist on the machine that will launch Chrome.
The path to the Chrome binary to use.
A self reference.
Sets the logging preferences. Preferences may be specified as a ./logging.Preferences instance, or as a map of log-type to log-level.
The logging preferences.
A self reference.
Configures Chrome to emulate a mobile device. For more information, refer to the ChromeDriver project page on mobile emulation. Configuration options include:
deviceName
: The name of a pre-configured emulated devicewidth
: screen width, in pixelsheight
: screen height, in pixelspixelRatio
: screen pixel ratioExample 1: Using a Pre-configured Device
let options = new chrome.Options().setMobileEmulation(
{deviceName: 'Google Nexus 5'});
let driver = new chrome.Driver(options);
Example 2: Using Custom Screen Configuration
let options = new chrome.Options().setMobileEmulation({
width: 360,
height: 640,
pixelRatio: 3.0
});
let driver = new chrome.Driver(options);
The
mobile emulation configuration, or null
to disable emulation.
A self reference.
Sets the desired page loading strategy for a new WebDriver session.
the desired strategy.
a self reference.
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 Chrome 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.The performance logging preferences.
A self reference.
Sets the target platform.
the target platform.
a self reference.
Sets the proxy configuration for this instance.
The desired proxy configuration.
A self reference.
Static
chromeA basic set of capabilities for Chrome.
Static
edgeA basic set of capabilities for Microsoft Edge.
Static
firefoxA basic set of capabilities for Firefox.
Static
fromExtracts the ChromeDriver specific options from the given capabilities object.
The capabilities object.
The ChromeDriver options.
Static
ieA basic set of capabilities for Internet Explorer.
Static
safariA basic set of capabilities for Safari.
Generated using TypeDoc
Class for managing ChromeDriver specific options.