import { Dialog } from "https://deno.land/x/pptr@1.2.0/src/Dialog.ts";
Dialog instances are dispatched by the Page via the dialog
event.
Examples
Example 1
Example 1
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
page.on('dialog', async dialog => {
console.log(dialog.message());
await dialog.dismiss();
await browser.close();
});
page.evaluate(() => alert('1'));
})();
Constructors
Properties
private
_client: CDPSession