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

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.
2 Replies
sharp-indigo
sharp-indigo3y ago
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
quickest-silver
quickest-silverOP3y ago
thanks. I already use the button click method but this is much nicer!

Did you find this page helpful?