NOTE Dialogs are dismissed automatically, unless there is a
page.on('dialog') listener. When listener is
present, it must either
dialog.accept([promptText]) or
dialog.dismiss() the dialog - otherwise the page
will freeze waiting for the
dialog, and actions like click will never finish.
Dialog objects are dispatched by page via the page.on('dialog') event.
An example of using
Dialog
class:NOTE Dialogs are dismissed automatically, unless there is a page.on('dialog') listener. When listener is present, it must either dialog.accept([promptText]) or dialog.dismiss() the dialog - otherwise the page will freeze waiting for the dialog, and actions like click will never finish.