Table of Contents

Class NetworkConditions

Namespace
Selenium.WebDriver.BiDi.Cdp.Network
Assembly
Selenium.WebDriver.BiDi.Cdp.dll
public sealed record NetworkConditions : IEquatable<NetworkConditions>
Inheritance
NetworkConditions
Implements
Inherited Members

Constructors

NetworkConditions(string, double, double, double)

public NetworkConditions(string UrlPattern, double Latency, double DownloadThroughput, double UploadThroughput)

Parameters

UrlPattern string

Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).

Latency double

Minimum latency from request sent to response headers received (ms).

DownloadThroughput double

Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.

UploadThroughput double

Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.

Properties

ConnectionType

Connection type if known.

public ConnectionType? ConnectionType { get; init; }

Property Value

ConnectionType?

DownloadThroughput

Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.

public double DownloadThroughput { get; init; }

Property Value

double

Latency

Minimum latency from request sent to response headers received (ms).

public double Latency { get; init; }

Property Value

double

Offline

True to emulate internet disconnection.

public bool? Offline { get; init; }

Property Value

bool?

PacketLoss

WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.

public double? PacketLoss { get; init; }

Property Value

double?

PacketQueueLength

WebRTC packet queue length (packet). 0 removes any queue length limitations.

public long? PacketQueueLength { get; init; }

Property Value

long?

PacketReordering

WebRTC packetReordering feature.

public bool? PacketReordering { get; init; }

Property Value

bool?

UploadThroughput

Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.

public double UploadThroughput { get; init; }

Property Value

double

UrlPattern

Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).

public string UrlPattern { get; init; }

Property Value

string