0

I am using Chrome DevToools through the Chrome remote interface.

One thing I don't see a way to do here is to close an alert box. Is this possible?

Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152
  • An `alert()` box cannot be closed programmatically. A html based alert dialog can be closed by triggering the expected events like click onto an element supposed to close the dialog or to emit keypress events supposed to close the dialog. – try-catch-finally Mar 25 '18 at 13:13
  • thanks for the response! there was totally an example of how to do it luckily for me. i just had not been able to find it in my initial google searches before asking this question – Nicholas DiPiazza Mar 25 '18 at 18:21

1 Answers1

0

I ended up finding a way:

Page.javascriptDialogOpening((params) => {
  Page.handleJavaScriptDialog({'accept': true});
});
Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152