Table of Contents

Class ChromiumNetworkConditions

Namespace
OpenQA.Selenium.Chromium
Assembly
WebDriver.dll

Provides manipulation of getting and setting network conditions from Chromium.

public class ChromiumNetworkConditions
Inheritance
ChromiumNetworkConditions
Inherited Members

Properties

DownloadThroughput

Gets or sets the throughput of the network connection in bytes/second for downloading.

[JsonPropertyName("download_throughput")]
public long DownloadThroughput { get; set; }

Property Value

long

IsOffline

Gets or sets a value indicating whether the network is offline. Defaults to false.

[JsonPropertyName("offline")]
public bool IsOffline { get; set; }

Property Value

bool

Latency

Gets or sets the simulated latency of the connection. Typically given in milliseconds.

[JsonIgnore]
public TimeSpan Latency { get; set; }

Property Value

TimeSpan

UploadThroughput

Gets or sets the throughput of the network connection in bytes/second for uploading.

[JsonPropertyName("upload_throughput")]
public long UploadThroughput { get; set; }

Property Value

long

Methods

FromDictionary(Dictionary<string, object>)

Creates a ChromiumNetworkConditions object from a dictionary of key-value pairs.

public static ChromiumNetworkConditions FromDictionary(Dictionary<string, object> dictionary)

Parameters

dictionary Dictionary<string, object>

The dictionary to use to create the object.

Returns

ChromiumNetworkConditions

The ChromiumNetworkConditions object created from the dictionary.

SetBidirectionalThroughput(long)

Sets the upload and download throughput properties to the same value.

public void SetBidirectionalThroughput(long throughput)

Parameters

throughput long

The throughput of the network connection in bytes/second for both upload and download.