Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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()
Comment

PREVIOUS NEXT
Code Example
Javascript :: js remove all children 
Javascript :: how to check is the key of a localstorage is emopty 
Javascript :: how to implement certain actions after setstate in react hooks 
Javascript :: exceljs font family 
Javascript :: sumar un mes a una fecha javascript moment 
Javascript :: node 14: fsevents@1.2.13: fsevents 1 will break on node 
Javascript :: lunix increae ram available to nodejs 
Javascript :: js convert a string into a number 
Javascript :: document ready vanilla js 
Javascript :: javascript foreach table 
Javascript :: change cover photo with javascript 
Javascript :: js how to get element csswidth 
Javascript :: url fetch app pass payload and headers 
Javascript :: mongodb js insertmany 
Javascript :: hash url owl carousel example 
Javascript :: return jsx in for loop 
Javascript :: jquery prev 
Javascript :: reverseString / Palindrome / Split string / Reverse Array 
Javascript :: only allow requests from domain express 
Javascript :: appinsights trackException javascript 
Javascript :: javascript delete object from array 
Javascript :: curved lines on google maps usint react 
Javascript :: nunjucks check if in array 
Javascript :: html js display pdf file 
Javascript :: redux actions.js 
Javascript :: check internet connection in react 
Javascript :: js create dom object 
Javascript :: javascript find method 
Javascript :: sequelize find result as raw json 
Javascript :: schema mongoose 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =