Methods
deleteNetworkConditions() → (non-null) {Promise}
Schedules a command to delete Chromium network emulation settings.
- Source
A promise that will be resolved when network emulation settings have been deleted.
- Type:
- Promise
getCastIssueMessage() → (non-null) {promise.Thenable.<void>}
Returns an error message when there is any issue in a Cast session.
- Source
A promise that will be resolved when the mirror command has been issued to the device.
- Type:
- promise.Thenable.<void>
getCastSinks() → (non-null) {promise.Thenable.<void>}
Returns the list of cast sinks (Cast devices) available to the Chrome media router.
- Source
A promise that will be resolved with an array of Strings containing the friendly device names of available cast sink targets.
- Type:
- promise.Thenable.<void>
getNetworkConditions() → (non-null) {Promise}
Schedules a command to get Chromium network emulation settings.
- Source
A promise that will be resolved when network emulation settings are retrieved.
- Type:
- Promise
launchApp(id) → (non-null) {Promise.<void>}
Schedules a command to launch Chrome App with given ID.
Name | Type | Description |
---|---|---|
id | string | ID of the App to launch. |
- Source
A promise that will be resolved when app is launched.
- Type:
- Promise.<void>
sendAndGetDevToolsCommand(cmd, paramsopt) → (non-null) {Promise.<string>}
Sends an arbitrary devtools command to the browser and get the result.
Name | Type | Attributes | Description |
---|---|---|---|
cmd | string | The name of the command to send. | |
params | Object | <optional> | The command parameters. |
- Source
A promise that will be resolved when the command has finished.
- Type:
- Promise.<string>
sendDevToolsCommand(cmd, paramsopt) → (non-null) {Promise.<void>}
Sends an arbitrary devtools command to the browser.
Name | Type | Attributes | Description |
---|---|---|---|
cmd | string | The name of the command to send. | |
params | Object | <optional> | The command parameters. |
- Source
A promise that will be resolved when the command has finished.
- Type:
- Promise.<void>
setCastSinkToUse(deviceName) → (non-null) {promise.Thenable.<void>}
Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).
Name | Type | Description |
---|---|---|
deviceName | String | name of the target device. |
- Source
A promise that will be resolved when the target device has been selected to respond further webdriver commands.
- Type:
- promise.Thenable.<void>
(async) setDownloadPath(path) → (non-null) {Promise.<void>}
Sends a DevTools command to change the browser's download directory.
Name | Type | Description |
---|---|---|
path | string | The desired download directory. |
- Source
A promise that will be resolved when the command has finished.
- Type:
- Promise.<void>
setFileDetector()
This function is a no-op as file detectors are not supported by this implementation.
- Source
setNetworkConditions(spec) → (non-null) {Promise.<void>}
Schedules a command to set Chromium network emulation settings.
Sample Usage:
driver.setNetworkConditions({ offline: false, latency: 5, // Additional latency (ms). download_throughput: 500 * 1024, // Maximal aggregated download throughput. upload_throughput: 500 * 1024 // Maximal aggregated upload throughput. });
Name | Type | Description |
---|---|---|
spec | Object | Defines the network conditions to set |
- Source
A promise that will be resolved when network emulation settings are set.
- Type:
- Promise.<void>
setPermission(name, state) → (non-null) {Promise.<Object>}
Set a permission state to the given value.
Name | Type | Description |
---|---|---|
name | string | A name of the permission to update. |
state | "granted" | | State to set permission to. |
- Source
A promise that will be resolved when the command has finished.
- Type:
- Promise.<Object>
startCastTabMirroring(deviceName) → (non-null) {promise.Thenable.<void>}
Initiates tab mirroring for the current browser tab on the specified device.
Name | Type | Description |
---|---|---|
deviceName | String | name of the target device. |
- Source
A promise that will be resolved when the mirror command has been issued to the device.
- Type:
- promise.Thenable.<void>
startDesktopMirroring(deviceName) → (non-null) {promise.Thenable.<void>}
Initiates desktop mirroring for the current browser tab on the specified device.
Name | Type | Description |
---|---|---|
deviceName | String | name of the target device. |
- Source
A promise that will be resolved when the mirror command has been issued to the device.
- Type:
- promise.Thenable.<void>
stopCasting(deviceName) → (non-null) {promise.Thenable.<void>}
Stops casting from media router to the specified device, if connected.
Name | Type | Description |
---|---|---|
deviceName | String | name of the target device. |
- Source
A promise that will be resolved when the stop command has been issued to the device.
- Type:
- promise.Thenable.<void>
(static) createSession(capsopt, opt_serviceExecutoropt, vendorPrefix, vendorCapabilityKey) → (non-null) {Driver}
Creates a new session with the WebDriver server.
Name | Type | Attributes | Description |
---|---|---|---|
caps | Capabilities | | <optional> | The configuration options. |
opt_serviceExecutor | remote. | <optional> | Either a DriverService to use for the remote end, or a preconfigured executor for an externally managed endpoint. If neither is provided, the default service will be used by default. |
vendorPrefix | Either 'goog' or 'ms' | ||
vendorCapabilityKey | Either 'goog:chromeOptions' or 'ms:edgeOptions' |
- Source
A new driver instance.
- Type:
- Driver