Table of Contents

Interface ILayerTree

Namespace
Selenium.WebDriver.BiDi.Cdp.LayerTree
Assembly
Selenium.WebDriver.BiDi.Cdp.dll
[Experimental("BIDICDP001")]
public interface ILayerTree

Properties

LayerPainted

IEventSource<LayerPaintedEventArgs> LayerPainted { get; }

Property Value

IEventSource<LayerPaintedEventArgs>

Remarks

Event args (LayerPaintedEventArgs):

  • LayerId - The id of the painted layer.
  • Clip - Clip rectangle.

LayerTreeDidChange

IEventSource<LayerTreeDidChangeEventArgs> LayerTreeDidChange { get; }

Property Value

IEventSource<LayerTreeDidChangeEventArgs>

Remarks

Event args (LayerTreeDidChangeEventArgs):

  • Layers - Layer tree, absent if not in the compositing mode.

Methods

CompositingReasonsAsync(LayerId, string?, CancellationToken)

Provides the reasons why the given layer was composited.

Task<CompositingReasonsResult> CompositingReasonsAsync(LayerId layerId, string? session = null, CancellationToken cancellationToken = default)

Parameters

layerId LayerId

The id of the layer for which we want to get the reasons it was composited.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<CompositingReasonsResult>

A task representing the asynchronous operation, containing a CompositingReasonsResult.

DisableAsync(string?, CancellationToken)

Disables compositing tree inspection.

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

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.

LoadSnapshotAsync(ImmutableArray<PictureTile>, string?, CancellationToken)

Returns the snapshot identifier.

Task<LoadSnapshotResult> LoadSnapshotAsync(ImmutableArray<PictureTile> tiles, string? session = null, CancellationToken cancellationToken = default)

Parameters

tiles ImmutableArray<PictureTile>

An array of tiles composing the snapshot.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<LoadSnapshotResult>

A task representing the asynchronous operation, containing a LoadSnapshotResult.

MakeSnapshotAsync(LayerId, string?, CancellationToken)

Returns the layer snapshot identifier.

Task<MakeSnapshotResult> MakeSnapshotAsync(LayerId layerId, string? session = null, CancellationToken cancellationToken = default)

Parameters

layerId LayerId

The id of the layer.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<MakeSnapshotResult>

A task representing the asynchronous operation, containing a MakeSnapshotResult.

ProfileSnapshotAsync(SnapshotId, long?, double?, Rect?, string?, CancellationToken)

Task<ProfileSnapshotResult> ProfileSnapshotAsync(SnapshotId snapshotId, long? minRepeatCount = null, double? minDuration = null, Rect? clipRect = null, string? session = null, CancellationToken cancellationToken = default)

Parameters

snapshotId SnapshotId

The id of the layer snapshot.

minRepeatCount long?

The maximum number of times to replay the snapshot (1, if not specified).

minDuration double?

The minimum duration (in seconds) to replay the snapshot.

clipRect Rect

The clip rectangle to apply when replaying the snapshot.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<ProfileSnapshotResult>

A task representing the asynchronous operation, containing a ProfileSnapshotResult.

ReleaseSnapshotAsync(SnapshotId, string?, CancellationToken)

Releases layer snapshot captured by the back-end.

Task<ReleaseSnapshotResult> ReleaseSnapshotAsync(SnapshotId snapshotId, string? session = null, CancellationToken cancellationToken = default)

Parameters

snapshotId SnapshotId

The id of the layer snapshot.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<ReleaseSnapshotResult>

A task representing the asynchronous operation, containing a ReleaseSnapshotResult.

ReplaySnapshotAsync(SnapshotId, long?, long?, double?, string?, CancellationToken)

Replays the layer snapshot and returns the resulting bitmap.

Task<ReplaySnapshotResult> ReplaySnapshotAsync(SnapshotId snapshotId, long? fromStep = null, long? toStep = null, double? scale = null, string? session = null, CancellationToken cancellationToken = default)

Parameters

snapshotId SnapshotId

The id of the layer snapshot.

fromStep long?

The first step to replay from (replay from the very start if not specified).

toStep long?

The last step to replay to (replay till the end if not specified).

scale double?

The scale to apply while replaying (defaults to 1).

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<ReplaySnapshotResult>

A task representing the asynchronous operation, containing a ReplaySnapshotResult.

SnapshotCommandLogAsync(SnapshotId, string?, CancellationToken)

Replays the layer snapshot and returns canvas log.

Task<SnapshotCommandLogResult> SnapshotCommandLogAsync(SnapshotId snapshotId, string? session = null, CancellationToken cancellationToken = default)

Parameters

snapshotId SnapshotId

The id of the layer snapshot.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<SnapshotCommandLogResult>

A task representing the asynchronous operation, containing a SnapshotCommandLogResult.