Table of Contents

Class BidiCdpSession

Namespace
PuppeteerSharp.Bidi
Assembly
PuppeteerSharp.dll

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public class BidiCdpSession : CDPSession, ICDPSession, ICDPConnection
Inheritance
BidiCdpSession
Implements

Properties

Detached

True if the session has been detached, false otherwise.

public override bool Detached { get; }

Property Value

bool

LoggerFactory

Gets the logger factory.

public override ILoggerFactory LoggerFactory { get; }

Property Value

ILoggerFactory

The logger factory.

Methods

Close(string)

Closes the session.

public override void Close(string reason = null)

Parameters

reason string

DetachAsync()

Detaches session from target. Once detached, session won't emit any events and can't be used to send messages.

public override Task DetachAsync()

Returns

Task

A Task that when awaited detaches from the session target.

Exceptions

PuppeteerException

If the Connection is closed.

SendAsync(string, object, bool, CommandOptions)

Protocol methods can be called with this method.

public override Task<JsonElement?> SendAsync(string method, object args = null, bool waitForCallback = true, CommandOptions options = null)

Parameters

method string

The method name.

args object

The method args.

waitForCallback bool

If true the method will return a task to be completed when the message is confirmed by Chromium. If false the task will be considered complete after sending the message to Chromium.

options CommandOptions

The options.

Returns

Task<JsonElement?>

The task.

Exceptions

PuppeteerException

If the Connection is closed.