const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
page.on('dialog', async dialog => {
console.log(dialog.message());
await dialog.dismiss();
});
await page.evaluate(() => alert('1'));
await browser.close();
})();
Returns when the dialog has been accepted.
If dialog is prompt, returns default prompt value. Otherwise, returns empty string.
Returns when the dialog has been dismissed.
A message displayed in the dialog.
The page that initiated this dialog, if available.
Returns dialog's type, can be one of alert
, beforeunload
, confirm
or prompt
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4