Skip to content

CdpPageTarget

Namespace: PuppeteerSharp.Cdp

public class CdpPageTarget : CdpTarget, ITarget

Page target.

Inheritance: object → Target → CdpTarget

Implements: ITarget

Derived: CdpDevToolsTarget

View source

public override Task<IPage> 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().

Returns: Task<IPage> — A task that returns a IPage.

View source

protected override void CheckIfInitialized()

Check is the target is not initialized.

View source

public override Task<IPage> PageAsync()

Returns the IPage associated with the target. If the target is not "page", "webview" or "background_page" returns null.

Returns: Task<IPage> — a task that returns a IPage.

View source

Made with love by Dario Kondratiuk