Table of Contents

Interface ISecurity

Namespace
Selenium.WebDriver.BiDi.Cdp.Security
Assembly
Selenium.WebDriver.BiDi.Cdp.dll
public interface ISecurity

Properties

CertificateError

There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally. Only one client per target should override certificate errors at the same time.

[Obsolete]
IEventSource<CertificateErrorEventArgs> CertificateError { get; }

Property Value

IEventSource<CertificateErrorEventArgs>

Remarks

Event args (CertificateErrorEventArgs):

  • EventId - The ID of the event.
  • ErrorType - The type of the error.
  • RequestURL - The url that was requested.

SecurityStateChanged

The security state of the page changed. No longer being sent.

[Obsolete]
IEventSource<SecurityStateChangedEventArgs> SecurityStateChanged { get; }

Property Value

IEventSource<SecurityStateChangedEventArgs>

Remarks

Event args (SecurityStateChangedEventArgs):

  • SecurityState - Security state.
  • SchemeIsCryptographic - True if the page was loaded over cryptographic transport such as HTTPS.
  • Explanations - Previously a list of explanations for the security state. Now always empty.
  • InsecureContentStatus - Information about insecure content on the page.
  • Summary - Overrides user-visible description of the state. Always omitted.

VisibleSecurityStateChanged

The security state of the page changed.

[Experimental("BIDICDP001")]
IEventSource<VisibleSecurityStateChangedEventArgs> VisibleSecurityStateChanged { get; }

Property Value

IEventSource<VisibleSecurityStateChangedEventArgs>

Remarks

Event args (VisibleSecurityStateChangedEventArgs):

  • VisibleSecurityState - Security state information about the page.

Methods

DisableAsync(string?, CancellationToken)

Disables tracking security state changes.

Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<DisableResult>

A task representing the asynchronous operation, containing a DisableResult.

EnableAsync(string?, CancellationToken)

Enables tracking security state changes.

Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<EnableResult>

A task representing the asynchronous operation, containing a EnableResult.

HandleCertificateErrorAsync(long, CertificateErrorAction, string?, CancellationToken)

Handles a certificate error that fired a certificateError event.

[Obsolete]
Task<HandleCertificateErrorResult> HandleCertificateErrorAsync(long eventId, CertificateErrorAction action, string? session = null, CancellationToken cancellationToken = default)

Parameters

eventId long

The ID of the event.

action CertificateErrorAction

The action to take on the certificate error.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<HandleCertificateErrorResult>

A task representing the asynchronous operation, containing a HandleCertificateErrorResult.

SetIgnoreCertificateErrorsAsync(bool, string?, CancellationToken)

Enable/disable whether all certificate errors should be ignored.

Task<SetIgnoreCertificateErrorsResult> SetIgnoreCertificateErrorsAsync(bool ignore, string? session = null, CancellationToken cancellationToken = default)

Parameters

ignore bool

If true, all certificate errors will be ignored.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<SetIgnoreCertificateErrorsResult>

A task representing the asynchronous operation, containing a SetIgnoreCertificateErrorsResult.

SetOverrideCertificateErrorsAsync(bool, string?, CancellationToken)

Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands.

[Obsolete]
Task<SetOverrideCertificateErrorsResult> SetOverrideCertificateErrorsAsync(bool @override, string? session = null, CancellationToken cancellationToken = default)

Parameters

override bool

If true, certificate errors will be overridden.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<SetOverrideCertificateErrorsResult>

A task representing the asynchronous operation, containing a SetOverrideCertificateErrorsResult.