import { Puppeteer } from "https://deno.land/x/pptr@1.2.0/mod.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
readonly
devices: DevicesMapreadonly
errors: PuppeteerErrorsMethods
clearCustomQueryHandlers(): void
Clears all registered handlers.
connect(options: ConnectOptions): Promise<Browser>
This method attaches Puppeteer to an existing browser instance.
customQueryHandlerNames(): string[]
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