Skip to main content

Function: dismissDialog()

dismissDialog(page, options?): Promise<void>

Defined in: src/modules/dialog.ts:272

Dismisses (closes) the topmost dialog, or a dialog matching the given title.

Parameters​

page​

DialogPage

Playwright Page (or compatible subset).

options?​

FindDialogOptions

Options to target a specific dialog by title.

Returns​

Promise<void>

Throws​

ControlError if no open dialog is found to dismiss.

Example​

await dismissDialog(page);