Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class Puppeteer
import { Puppeteer } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/common/Puppeteer.d.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
readonly
networkConditions: PredefinedNetworkConditions

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