Table of Contents

Class NetworkAdapter

Namespace
OpenQA.Selenium.DevTools.V85.Network
Assembly
WebDriver.dll

Represents an adapter for the Network domain to simplify the command interface.

public class NetworkAdapter
Inheritance
NetworkAdapter
Inherited Members

Constructors

NetworkAdapter(IDevToolsSession)

Initializes a new instance of the NetworkAdapter class.

public NetworkAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

CanClearBrowserCache(CanClearBrowserCacheCommandSettings, CancellationToken, int?, bool)

canClearBrowserCache

public Task<CanClearBrowserCacheCommandResponse> CanClearBrowserCache(CanClearBrowserCacheCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CanClearBrowserCacheCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CanClearBrowserCacheCommandResponse>

CanClearBrowserCookies(CanClearBrowserCookiesCommandSettings, CancellationToken, int?, bool)

canClearBrowserCookies

public Task<CanClearBrowserCookiesCommandResponse> CanClearBrowserCookies(CanClearBrowserCookiesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CanClearBrowserCookiesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CanClearBrowserCookiesCommandResponse>

CanEmulateNetworkConditions(CanEmulateNetworkConditionsCommandSettings, CancellationToken, int?, bool)

canEmulateNetworkConditions

public Task<CanEmulateNetworkConditionsCommandResponse> CanEmulateNetworkConditions(CanEmulateNetworkConditionsCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CanEmulateNetworkConditionsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CanEmulateNetworkConditionsCommandResponse>

ClearBrowserCache(ClearBrowserCacheCommandSettings, CancellationToken, int?, bool)

clearBrowserCache

public Task<ClearBrowserCacheCommandResponse> ClearBrowserCache(ClearBrowserCacheCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearBrowserCacheCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearBrowserCacheCommandResponse>

ClearBrowserCookies(ClearBrowserCookiesCommandSettings, CancellationToken, int?, bool)

clearBrowserCookies

public Task<ClearBrowserCookiesCommandResponse> ClearBrowserCookies(ClearBrowserCookiesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearBrowserCookiesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearBrowserCookiesCommandResponse>

ContinueInterceptedRequest(ContinueInterceptedRequestCommandSettings, CancellationToken, int?, bool)

continueInterceptedRequest

public Task<ContinueInterceptedRequestCommandResponse> ContinueInterceptedRequest(ContinueInterceptedRequestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ContinueInterceptedRequestCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ContinueInterceptedRequestCommandResponse>

DeleteCookies(DeleteCookiesCommandSettings, CancellationToken, int?, bool)

deleteCookies

public Task<DeleteCookiesCommandResponse> DeleteCookies(DeleteCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DeleteCookiesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DeleteCookiesCommandResponse>

Disable(DisableCommandSettings, CancellationToken, int?, bool)

disable

public Task<DisableCommandResponse> Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DisableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DisableCommandResponse>

EmulateNetworkConditions(EmulateNetworkConditionsCommandSettings, CancellationToken, int?, bool)

emulateNetworkConditions

public Task<EmulateNetworkConditionsCommandResponse> EmulateNetworkConditions(EmulateNetworkConditionsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command EmulateNetworkConditionsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EmulateNetworkConditionsCommandResponse>

Enable(EnableCommandSettings, CancellationToken, int?, bool)

enable

public Task<EnableCommandResponse> Enable(EnableCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command EnableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EnableCommandResponse>

GetAllCookies(GetAllCookiesCommandSettings, CancellationToken, int?, bool)

getAllCookies

public Task<GetAllCookiesCommandResponse> GetAllCookies(GetAllCookiesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetAllCookiesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetAllCookiesCommandResponse>

GetCertificate(GetCertificateCommandSettings, CancellationToken, int?, bool)

getCertificate

public Task<GetCertificateCommandResponse> GetCertificate(GetCertificateCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetCertificateCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetCertificateCommandResponse>

GetCookies(GetCookiesCommandSettings, CancellationToken, int?, bool)

getCookies

public Task<GetCookiesCommandResponse> GetCookies(GetCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetCookiesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetCookiesCommandResponse>

GetRequestPostData(GetRequestPostDataCommandSettings, CancellationToken, int?, bool)

getRequestPostData

public Task<GetRequestPostDataCommandResponse> GetRequestPostData(GetRequestPostDataCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetRequestPostDataCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetRequestPostDataCommandResponse>

GetResponseBody(GetResponseBodyCommandSettings, CancellationToken, int?, bool)

getResponseBody

public Task<GetResponseBodyCommandResponse> GetResponseBody(GetResponseBodyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetResponseBodyCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetResponseBodyCommandResponse>

GetResponseBodyForInterception(GetResponseBodyForInterceptionCommandSettings, CancellationToken, int?, bool)

getResponseBodyForInterception

public Task<GetResponseBodyForInterceptionCommandResponse> GetResponseBodyForInterception(GetResponseBodyForInterceptionCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetResponseBodyForInterceptionCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetResponseBodyForInterceptionCommandResponse>

ReplayXHR(ReplayXHRCommandSettings, CancellationToken, int?, bool)

replayXHR

public Task<ReplayXHRCommandResponse> ReplayXHR(ReplayXHRCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ReplayXHRCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ReplayXHRCommandResponse>

SearchInResponseBody(SearchInResponseBodyCommandSettings, CancellationToken, int?, bool)

searchInResponseBody

public Task<SearchInResponseBodyCommandResponse> SearchInResponseBody(SearchInResponseBodyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SearchInResponseBodyCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SearchInResponseBodyCommandResponse>

SetBlockedURLs(SetBlockedURLsCommandSettings, CancellationToken, int?, bool)

setBlockedURLs

public Task<SetBlockedURLsCommandResponse> SetBlockedURLs(SetBlockedURLsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetBlockedURLsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetBlockedURLsCommandResponse>

SetBypassServiceWorker(SetBypassServiceWorkerCommandSettings, CancellationToken, int?, bool)

setBypassServiceWorker

public Task<SetBypassServiceWorkerCommandResponse> SetBypassServiceWorker(SetBypassServiceWorkerCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetBypassServiceWorkerCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetBypassServiceWorkerCommandResponse>

SetCacheDisabled(SetCacheDisabledCommandSettings, CancellationToken, int?, bool)

setCacheDisabled

public Task<SetCacheDisabledCommandResponse> SetCacheDisabled(SetCacheDisabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetCacheDisabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetCacheDisabledCommandResponse>

SetCookie(SetCookieCommandSettings, CancellationToken, int?, bool)

setCookie

public Task<SetCookieCommandResponse> SetCookie(SetCookieCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetCookieCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetCookieCommandResponse>

SetCookies(SetCookiesCommandSettings, CancellationToken, int?, bool)

setCookies

public Task<SetCookiesCommandResponse> SetCookies(SetCookiesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetCookiesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetCookiesCommandResponse>

SetDataSizeLimitsForTest(SetDataSizeLimitsForTestCommandSettings, CancellationToken, int?, bool)

setDataSizeLimitsForTest

public Task<SetDataSizeLimitsForTestCommandResponse> SetDataSizeLimitsForTest(SetDataSizeLimitsForTestCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetDataSizeLimitsForTestCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetDataSizeLimitsForTestCommandResponse>

SetExtraHTTPHeaders(SetExtraHTTPHeadersCommandSettings, CancellationToken, int?, bool)

setExtraHTTPHeaders

public Task<SetExtraHTTPHeadersCommandResponse> SetExtraHTTPHeaders(SetExtraHTTPHeadersCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetExtraHTTPHeadersCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetExtraHTTPHeadersCommandResponse>

SetRequestInterception(SetRequestInterceptionCommandSettings, CancellationToken, int?, bool)

setRequestInterception

public Task<SetRequestInterceptionCommandResponse> SetRequestInterception(SetRequestInterceptionCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetRequestInterceptionCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetRequestInterceptionCommandResponse>

SetUserAgentOverride(SetUserAgentOverrideCommandSettings, CancellationToken, int?, bool)

setUserAgentOverride

public Task<SetUserAgentOverrideCommandResponse> SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetUserAgentOverrideCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetUserAgentOverrideCommandResponse>

TakeResponseBodyForInterceptionAsStream(TakeResponseBodyForInterceptionAsStreamCommandSettings, CancellationToken, int?, bool)

takeResponseBodyForInterceptionAsStream

public Task<TakeResponseBodyForInterceptionAsStreamCommandResponse> TakeResponseBodyForInterceptionAsStream(TakeResponseBodyForInterceptionAsStreamCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command TakeResponseBodyForInterceptionAsStreamCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<TakeResponseBodyForInterceptionAsStreamCommandResponse>

Events

DataReceived

dataReceived

public event EventHandler<DataReceivedEventArgs> DataReceived

Event Type

EventHandler<DataReceivedEventArgs>

EventSourceMessageReceived

eventSourceMessageReceived

public event EventHandler<EventSourceMessageReceivedEventArgs> EventSourceMessageReceived

Event Type

EventHandler<EventSourceMessageReceivedEventArgs>

LoadingFailed

loadingFailed

public event EventHandler<LoadingFailedEventArgs> LoadingFailed

Event Type

EventHandler<LoadingFailedEventArgs>

LoadingFinished

loadingFinished

public event EventHandler<LoadingFinishedEventArgs> LoadingFinished

Event Type

EventHandler<LoadingFinishedEventArgs>

RequestIntercepted

requestIntercepted

public event EventHandler<RequestInterceptedEventArgs> RequestIntercepted

Event Type

EventHandler<RequestInterceptedEventArgs>

RequestServedFromCache

requestServedFromCache

public event EventHandler<RequestServedFromCacheEventArgs> RequestServedFromCache

Event Type

EventHandler<RequestServedFromCacheEventArgs>

RequestWillBeSent

requestWillBeSent

public event EventHandler<RequestWillBeSentEventArgs> RequestWillBeSent

Event Type

EventHandler<RequestWillBeSentEventArgs>

RequestWillBeSentExtraInfo

requestWillBeSentExtraInfo

public event EventHandler<RequestWillBeSentExtraInfoEventArgs> RequestWillBeSentExtraInfo

Event Type

EventHandler<RequestWillBeSentExtraInfoEventArgs>

ResourceChangedPriority

resourceChangedPriority

public event EventHandler<ResourceChangedPriorityEventArgs> ResourceChangedPriority

Event Type

EventHandler<ResourceChangedPriorityEventArgs>

ResponseReceived

responseReceived

public event EventHandler<ResponseReceivedEventArgs> ResponseReceived

Event Type

EventHandler<ResponseReceivedEventArgs>

ResponseReceivedExtraInfo

responseReceivedExtraInfo

public event EventHandler<ResponseReceivedExtraInfoEventArgs> ResponseReceivedExtraInfo

Event Type

EventHandler<ResponseReceivedExtraInfoEventArgs>

SignedExchangeReceived

signedExchangeReceived

public event EventHandler<SignedExchangeReceivedEventArgs> SignedExchangeReceived

Event Type

EventHandler<SignedExchangeReceivedEventArgs>

WebSocketClosed

webSocketClosed

public event EventHandler<WebSocketClosedEventArgs> WebSocketClosed

Event Type

EventHandler<WebSocketClosedEventArgs>

WebSocketCreated

webSocketCreated

public event EventHandler<WebSocketCreatedEventArgs> WebSocketCreated

Event Type

EventHandler<WebSocketCreatedEventArgs>

WebSocketFrameError

webSocketFrameError

public event EventHandler<WebSocketFrameErrorEventArgs> WebSocketFrameError

Event Type

EventHandler<WebSocketFrameErrorEventArgs>

WebSocketFrameReceived

webSocketFrameReceived

public event EventHandler<WebSocketFrameReceivedEventArgs> WebSocketFrameReceived

Event Type

EventHandler<WebSocketFrameReceivedEventArgs>

WebSocketFrameSent

webSocketFrameSent

public event EventHandler<WebSocketFrameSentEventArgs> WebSocketFrameSent

Event Type

EventHandler<WebSocketFrameSentEventArgs>

WebSocketHandshakeResponseReceived

webSocketHandshakeResponseReceived

public event EventHandler<WebSocketHandshakeResponseReceivedEventArgs> WebSocketHandshakeResponseReceived

Event Type

EventHandler<WebSocketHandshakeResponseReceivedEventArgs>

WebSocketWillSendHandshakeRequest

webSocketWillSendHandshakeRequest

public event EventHandler<WebSocketWillSendHandshakeRequestEventArgs> WebSocketWillSendHandshakeRequest

Event Type

EventHandler<WebSocketWillSendHandshakeRequestEventArgs>