showing results for - "how to click on alret dialog with pupeteer"
Oskar
07 Oct 2019
1const puppeteer = require('puppeteer');
2async function run(){
3	const browser = await puppeteer.launch({headless:false})
4    const page = await browser.newPage();
5	page.on('dialog', async dialog => {
6    console.log(dialog.message());
7    await dialog.dismiss();
8	});
9	await page.goto('https://chercher.tech/practice/popups');
10	await page.click("input[name='alert']")
11    await browser.close();
12}
13run()