Table of Contents

Class RequestInterceptedEventArgs

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

Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.

public sealed class RequestInterceptedEventArgs : EventArgs
Inheritance
RequestInterceptedEventArgs
Inherited Members

Properties

AuthChallenge

Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.

[JsonPropertyName("authChallenge")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public AuthChallenge? AuthChallenge { get; set; }

Property Value

AuthChallenge

FrameId

The id of the frame that initiated the request.

[JsonPropertyName("frameId")]
public string FrameId { get; set; }

Property Value

string

InterceptionId

Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used.

[JsonPropertyName("interceptionId")]
public string InterceptionId { get; set; }

Property Value

string

IsDownload

Set if the request is a navigation that will result in a download. Only present after response is received from the server (i.e. HeadersReceived stage).

[JsonPropertyName("isDownload")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? IsDownload { get; set; }

Property Value

bool?

IsNavigationRequest

Whether this is a navigation request, which can abort the navigation completely.

[JsonPropertyName("isNavigationRequest")]
public bool IsNavigationRequest { get; set; }

Property Value

bool

RedirectUrl

Redirect location, only sent if a redirect was intercepted.

[JsonPropertyName("redirectUrl")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? RedirectUrl { get; set; }

Property Value

string

Request

Gets or sets the request

[JsonPropertyName("request")]
public Request Request { get; set; }

Property Value

Request

RequestId

If the intercepted request had a corresponding requestWillBeSent event fired for it, then this requestId will be the same as the requestId present in the requestWillBeSent event.

[JsonPropertyName("requestId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? RequestId { get; set; }

Property Value

string

ResourceType

How the requested resource will be used.

[JsonPropertyName("resourceType")]
public ResourceType ResourceType { get; set; }

Property Value

ResourceType

ResponseErrorReason

Response error if intercepted at response stage or if redirect occurred while intercepting request.

[JsonPropertyName("responseErrorReason")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ErrorReason? ResponseErrorReason { get; set; }

Property Value

ErrorReason?

ResponseHeaders

Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.

[JsonPropertyName("responseHeaders")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Headers? ResponseHeaders { get; set; }

Property Value

Headers

ResponseStatusCode

Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.

[JsonPropertyName("responseStatusCode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public long? ResponseStatusCode { get; set; }

Property Value

long?