How can i accept this pop up?
See original GitHub issue
I tried
page.on('popup', async dialog => {
console.log(dialog.message());
await dialog.dismiss();
await browser.close();
});
and also
page.on('dialog', async dialog => {
console.log(dialog.message());
await dialog.dismiss();
await browser.close();
});
But both did not help me
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
8 Ways to Allow Pop–ups - wikiHow
1. Open Google Chrome {"smallUrl":"https:\/\/www.wikihow.com\/images\/c\/cd\/Android7chrome.png","bigUrl":"\/images\/thumb\/c\/cd\/Android7chrome.png\/30px ... 2. Click the menu ⋮. It's the three vertical dots at the top-right corner of Chrome. 3....
Read more >Configuring your web browser to allow pop-up windows
Open Chrome, then go to the web page that you want to allow pop-ups. · In Chrome's URL window, highlight the entire web...
Read more >How to Allow Pop-Ups in Google Chrome - Business Insider
1. Open your Chrome web browser and navigate to the site you want to allow pop-ups on. · 2. Click the lock icon...
Read more >Allow Pop-ups for Specific Websites
Select Add next to Allowed to send pop-ups and use redirects. Input the specific page URL and select Add. Firefox. From the Firefox...
Read more >How to Disable or Enable Your Pop-up Blocker
FIREFOX (MAC). Select Preferences from the Firefox menu. Select the Privacy and Security tab. To disable the pop-up blocker, uncheck the Block pop-up...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The second code bock is what should be working. Are you adding your page bindings prior the the dialog being triggered?
Here is an example I tried that works as expected.
@nicoandmee can you please explain with example which you mentioned in the above comment registering the dialog handle prior to visiting the page before. I’m also facing same issue which @leochung042 is facing. As soon as i visit the page dialog popup appears and ask for username and password. Thanks