Network.emulateNetworkConditionsActivates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule and overrideNetworkState commands, which can be used together to the same effect.
| Name | Type | Description |
|---|---|---|
offline | boolean | True to emulate internet disconnection. |
latency | number | Minimum latency from request sent to response headers received (ms). |
downloadThroughput | number | Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. |
uploadThroughput | number | Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. |
connectionType (optional) | ConnectionType | Connection type if known. |
packetLoss (optional) | number | WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets. |
packetQueueLength (optional) | integer | WebRTC packet queue length (packet). 0 removes any queue length limitations. |
packetReordering (optional) | boolean | WebRTC packetReordering feature. |
{
"id": 1,
"method": "Network.emulateNetworkConditions",
"params": {
"offline": true,
"latency": 1.0,
"downloadThroughput": 1.0,
"uploadThroughput": 1.0
}
}
{
"id": 1,
"result": {}
}
const result = await send('Network.emulateNetworkConditions', {"offline": true, "latency": 1.0, "downloadThroughput": 1.0, "uploadThroughput": 1.0});
console.log(result);