import { Dialog } from "https://deno.land/x/frugal@0.9.6/dep/puppeteer/mod.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'));
})();