Table of Contents

Class TracingAdapter

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

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

public class TracingAdapter
Inheritance
TracingAdapter
Inherited Members

Constructors

TracingAdapter(IDevToolsSession)

Initializes a new instance of the TracingAdapter class.

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

End(EndCommandSettings?, CancellationToken, int?, bool)

Stop trace events collection.

public Task<EndCommandResponse?> End(EndCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command EndCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EndCommandResponse>

GetCategories(GetCategoriesCommandSettings?, CancellationToken, int?, bool)

Gets supported tracing categories.

public Task<GetCategoriesCommandResponse> GetCategories(GetCategoriesCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetCategoriesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetCategoriesCommandResponse>

GetTrackEventDescriptor(GetTrackEventDescriptorCommandSettings?, CancellationToken, int?, bool)

Return a descriptor for all available tracing categories.

public Task<GetTrackEventDescriptorCommandResponse> GetTrackEventDescriptor(GetTrackEventDescriptorCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetTrackEventDescriptorCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetTrackEventDescriptorCommandResponse>

RecordClockSyncMarker(RecordClockSyncMarkerCommandSettings, CancellationToken, int?, bool)

Record a clock sync marker in the trace.

public Task<RecordClockSyncMarkerCommandResponse?> RecordClockSyncMarker(RecordClockSyncMarkerCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RecordClockSyncMarkerCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RecordClockSyncMarkerCommandResponse>

RequestMemoryDump(RequestMemoryDumpCommandSettings, CancellationToken, int?, bool)

Request a global memory dump.

public Task<RequestMemoryDumpCommandResponse> RequestMemoryDump(RequestMemoryDumpCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command RequestMemoryDumpCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<RequestMemoryDumpCommandResponse>

Start(StartCommandSettings, CancellationToken, int?, bool)

Start trace events collection.

public Task<StartCommandResponse?> Start(StartCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command StartCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<StartCommandResponse>

Events

BufferUsage

bufferUsage

public event EventHandler<BufferUsageEventArgs>? BufferUsage

Event Type

EventHandler<BufferUsageEventArgs>

DataCollected

Contains a bucket of collected trace events. When tracing is stopped collected events will be sent as a sequence of dataCollected events followed by tracingComplete event.

public event EventHandler<DataCollectedEventArgs>? DataCollected

Event Type

EventHandler<DataCollectedEventArgs>

TracingComplete

Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.

public event EventHandler<TracingCompleteEventArgs>? TracingComplete

Event Type

EventHandler<TracingCompleteEventArgs>