Skip to main content
Version: 1.x

Function: dismissDialog()

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

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

Ai

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>

Intent

Close the topmost open dialog without confirming its action.

Guarantee

On success, the dialog's close() method has been called and UI5 is stable.

Ai Context

Calls close() on the dialog control. Use for cancelling or dismissing. To confirm a dialog, use confirmDialog() instead.

Sap Module

sap.m.Dialog — close() method

Business Context

Cancel or dismiss SAP dialog overlays (Cancel, Close, X button).

Throws

ControlError if no open dialog is found to dismiss.

Example

await dismissDialog(page);