Table of Contents

Class LayerTreeAdapter

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

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

public class LayerTreeAdapter
Inheritance
LayerTreeAdapter
Inherited Members

Constructors

LayerTreeAdapter(IDevToolsSession)

Initializes a new instance of the LayerTreeAdapter class.

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

CompositingReasons(CompositingReasonsCommandSettings, CancellationToken, int?, bool)

Provides the reasons why the given layer was composited.

public Task<CompositingReasonsCommandResponse> CompositingReasons(CompositingReasonsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CompositingReasonsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CompositingReasonsCommandResponse>

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

Disables compositing tree inspection.

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 compositing tree inspection.

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>

LoadSnapshot(LoadSnapshotCommandSettings, CancellationToken, int?, bool)

Returns the snapshot identifier.

public Task<LoadSnapshotCommandResponse> LoadSnapshot(LoadSnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command LoadSnapshotCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<LoadSnapshotCommandResponse>

MakeSnapshot(MakeSnapshotCommandSettings, CancellationToken, int?, bool)

Returns the layer snapshot identifier.

public Task<MakeSnapshotCommandResponse> MakeSnapshot(MakeSnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command MakeSnapshotCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<MakeSnapshotCommandResponse>

ProfileSnapshot(ProfileSnapshotCommandSettings, CancellationToken, int?, bool)

profileSnapshot

public Task<ProfileSnapshotCommandResponse> ProfileSnapshot(ProfileSnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ProfileSnapshotCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ProfileSnapshotCommandResponse>

ReleaseSnapshot(ReleaseSnapshotCommandSettings, CancellationToken, int?, bool)

Releases layer snapshot captured by the back-end.

public Task<ReleaseSnapshotCommandResponse?> ReleaseSnapshot(ReleaseSnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ReleaseSnapshotCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ReleaseSnapshotCommandResponse>

ReplaySnapshot(ReplaySnapshotCommandSettings, CancellationToken, int?, bool)

Replays the layer snapshot and returns the resulting bitmap.

public Task<ReplaySnapshotCommandResponse> ReplaySnapshot(ReplaySnapshotCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ReplaySnapshotCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ReplaySnapshotCommandResponse>

SnapshotCommandLog(SnapshotCommandLogCommandSettings, CancellationToken, int?, bool)

Replays the layer snapshot and returns canvas log.

public Task<SnapshotCommandLogCommandResponse> SnapshotCommandLog(SnapshotCommandLogCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SnapshotCommandLogCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SnapshotCommandLogCommandResponse>

Events

LayerPainted

layerPainted

public event EventHandler<LayerPaintedEventArgs>? LayerPainted

Event Type

EventHandler<LayerPaintedEventArgs>

LayerTreeDidChange

layerTreeDidChange

public event EventHandler<LayerTreeDidChangeEventArgs>? LayerTreeDidChange

Event Type

EventHandler<LayerTreeDidChangeEventArgs>