Table of Contents

Class LogAdapter

Namespace
OpenQA.Selenium.DevTools.V146.Log
Assembly
Selenium.WebDriver.dll

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

public class LogAdapter
Inheritance
LogAdapter
Inherited Members

Constructors

LogAdapter(IDevToolsSession)

Initializes a new instance of the LogAdapter class.

public LogAdapter(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

Clear(ClearCommandSettings?, CancellationToken, int?, bool)

Clears the log.

public Task<ClearCommandResponse?> Clear(ClearCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ClearCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ClearCommandResponse>

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

Disables log domain, prevents further log entries 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 log domain, sends the entries collected so far to the client by means of the entryAdded 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>

StartViolationsReport(StartViolationsReportCommandSettings, CancellationToken, int?, bool)

start violation reporting.

public Task<StartViolationsReportCommandResponse?> StartViolationsReport(StartViolationsReportCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command StartViolationsReportCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<StartViolationsReportCommandResponse>

StopViolationsReport(StopViolationsReportCommandSettings?, CancellationToken, int?, bool)

Stop violation reporting.

public Task<StopViolationsReportCommandResponse?> StopViolationsReport(StopViolationsReportCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command StopViolationsReportCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<StopViolationsReportCommandResponse>

Events

EntryAdded

Issued when new message was logged.

public event EventHandler<EntryAddedEventArgs>? EntryAdded

Event Type

EventHandler<EntryAddedEventArgs>