MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / setNetworkConditions

Method setNetworkConditions

javascript/selenium-webdriver/chromium.js:709–714  ·  view source on GitHub ↗

* 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. * u

(spec)

Source from the content-addressed store, hash-verified

707 * emulation settings are set.
708 */
709 setNetworkConditions(spec) {
710 if (!spec || typeof spec !== 'object') {
711 throw TypeError('setNetworkConditions called with non-network-conditions parameter')
712 }
713 return this.execute(new command.Command(Command.SET_NETWORK_CONDITIONS).setParameter('network_conditions', spec))
714 }
715
716 /**
717 * Sends an arbitrary devtools command to the browser.

Callers

nothing calls this directly

Calls 2

setParameterMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected