Answers for "how to click on alret dialog with pupeteer"

0

how to click on alret dialog with pupeteer

const puppeteer = require('puppeteer');
async function run(){
	const browser = await puppeteer.launch({headless:false})
    const page = await browser.newPage();
	page.on('dialog', async dialog => {
    console.log(dialog.message());
    await dialog.dismiss();
	});
	await page.goto('https://chercher.tech/practice/popups');
	await page.click("input[name='alert']")
    await browser.close();
}
run()
Posted by: Guest on March-19-2021

Code answers related to "how to click on alret dialog with pupeteer"

Code answers related to "Javascript"

Browse Popular Code Answers by Language