overrideNetworkState
suspend fun overrideNetworkState(args: Network.OverrideNetworkStateParameter, mode: CommandMode = CommandMode.DEFAULT)
Override the state of navigator.onLine and navigator.connection.
suspend fun overrideNetworkState(offline: Boolean, latency: Double, downloadThroughput: Double, uploadThroughput: Double, connectionType: Network.ConnectionType? = null)
Override the state of navigator.onLine and navigator.connection.
Parameters
offline
True to emulate internet disconnection.
latency
Minimum latency from request sent to response headers received (ms).
downloadThroughput
Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
uploadThroughput
Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
connectionType
Connection type if known.