Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/src/Puppeteer.ts>Puppeteer

Headless Chrome Deno API
Latest
class Puppeteer
import { Puppeteer } from "https://deno.land/x/pptr@1.2.0/src/Puppeteer.ts";

The main Puppeteer class.

IMPORTANT: if you are using Puppeteer in a Node environment, you will get an instance of PuppeteerNode when you import or require puppeteer. That class extends Puppeteer, so has all the methods documented below as well as all that are defined on PuppeteerNode.

Constructors

new
Puppeteer(settings: CommonPuppeteerSettings)

Properties

protected
_changedProduct: boolean
protected
_isPuppeteerCore: boolean
readonly
devices: DevicesMap
readonly
errors: PuppeteerErrors

Methods

Clears all registered handlers.

connect(options: ConnectOptions): Promise<Browser>

This method attaches Puppeteer to an existing browser instance.

registerCustomQueryHandler(name: string, queryHandler: CustomQueryHandler): void

Registers a CustomQueryHandler | custom query handler. After registration, the handler can be used everywhere where a selector is expected by prepending the selection string with <name>/. The name is only allowed to consist of lower- and upper case latin letters.

unregisterCustomQueryHandler(name: string): void