Table of Contents

Class CdpTarget

Namespace
PuppeteerSharp.Cdp
Assembly
PuppeteerSharp.dll

Target.

public class CdpTarget : Target, ITarget
Inheritance
CdpTarget
Implements
Derived

Properties

Opener

Get the target that opened this target.

public override ITarget Opener { get; }

Property Value

ITarget

Remarks

Top-level targets return null.

Methods

AsPageAsync()

Forcefully creates a page for a target of any type. It is useful if you want to handle a CDP target of type other as a page. If you deal with a regular page target, use PageAsync().

public override Task<IPage> AsPageAsync()

Returns

Task<IPage>

A task that returns a IPage.

CheckIfInitialized()

Check is the target is not initialized.

protected virtual void CheckIfInitialized()

CreateCDPSessionAsync()

Creates a Chrome Devtools Protocol session attached to the target.

public override Task<ICDPSession> CreateCDPSessionAsync()

Returns

Task<ICDPSession>

A task that returns a ICDPSession.