import { PuppeteerDeno } from "https://deno.land/x/puppeteer@16.2.0/src/deno/Puppeteer.ts";
Extends the main Puppeteer class with Node specific behaviour for fetching and downloading browsers.
If you're using Puppeteer in a Node environment, this is the class you'll get
when you run require('puppeteer')
(or the equivalent ES import
).
Examples
The following is a typical example of using Puppeteer to drive automation:
The following is a typical example of using Puppeteer to drive automation:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://www.google.com');
// other actions...
await browser.close();
})();
Once you have created a page
you have access to a large API to interact
with the page, navigate, or find certain elements in that page.
The Page | page
documentation lists all the available methods.
Methods
connect(options: ConnectOptions): Promise<Browser>
This method attaches Puppeteer to an existing browser instance.
createBrowserFetcher(options: BrowserFetcherOptions): BrowserFetcher
defaultArgs(options?: ChromeArgOptions): string[]
executablePath(): string
launch(options?: ): Promise<Browser>
& LaunchOptions
& ChromeArgOptions
& BrowserConnectOptions
& { product?: Product; extraPrefsFirefox?: Record<string, unknown>; }
Launches puppeteer and launches a browser instance with given arguments and options when specified.