Apify Discord Mirror

Updated 5 months ago

Is it possible to close any dialogs that pop up automatically?

At a glance

The community member posted about sometimes encountering dialog boxes on websites that they are not interested in and would like to be dismissed. In the comments, another community member suggested using the page.event('dialog') method from Playwright (or a similar method in Puppeteer) to handle these dialog boxes. The original poster responded that they were already using a button click method, but that the suggested approach is "much nicer".

Useful resources
Sometimes a dialog box might pop up on a site and I am not interested in the dialog and would just like it to be dismissed.
A
C
2 comments
this might help: https://playwright.dev/docs/api/class-page#page-event-dialog (puppeteer should have something similar). If it's website popup, not detected by this - you could add some helper at the beginning of requestHandler which would basically click on some button if it would be detected
thanks. I already use the button click method but this is much nicer!
Add a reply
Sign up and join the conversation on Discord