MCPcopy
hub / github.com/SeleniumHQ/selenium / setNetworkConditions

Method setNetworkConditions

javascript/selenium-webdriver/chromium.js:708–713  ·  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

706 * emulation settings are set.
707 */
708 setNetworkConditions(spec) {
709 if (!spec || typeof spec !== 'object') {
710 throw TypeError('setNetworkConditions called with non-network-conditions parameter')
711 }
712 return this.execute(new command.Command(Command.SET_NETWORK_CONDITIONS).setParameter('network_conditions', spec))
713 }
714
715 /**
716 * 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