Table of Contents

Class ConsoleAdapter

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

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

public class ConsoleAdapter
Inheritance
ConsoleAdapter
Inherited Members

Constructors

ConsoleAdapter(IDevToolsSession)

Initializes a new instance of the ConsoleAdapter class.

public ConsoleAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Exceptions

ArgumentNullException

If session is null.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

ClearMessages(ClearMessagesCommandSettings?, CancellationToken, int?, bool)

Does nothing.

public Task<ClearMessagesCommandResponse?> ClearMessages(ClearMessagesCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearMessagesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearMessagesCommandResponse>

Disable(DisableCommandSettings?, CancellationToken, int?, bool)

Disables console domain, prevents further console messages from being reported to the client.

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>

Enable(EnableCommandSettings?, CancellationToken, int?, bool)

Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification.

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

Parameters

command EnableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EnableCommandResponse>

Events

MessageAdded

Issued when new console message is added.

public event EventHandler<MessageAddedEventArgs>? MessageAdded

Event Type

EventHandler<MessageAddedEventArgs>