import { Dialog } from "https://deno.land/x/pptr@1.2.0/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'));
})();
Constructors
Properties
private
_client: CDPSessionprivate
_type: Protocol.Page.DialogTypeMethods
accept(promptText?: string): Promise<void>
defaultValue(): string
dismiss(): Promise<void>
message(): string