Skip to main content
Version: 1.x

Function: waitForDialog()

waitForDialog(page, options?): Promise<DialogInfo>

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

Ai

Waits for a dialog to appear in the UI5 static UI area.

Parameters

page

DialogPage

Playwright Page (or compatible subset).

options?

FindDialogOptions

Options to filter by title or control type.

Returns

Promise<DialogInfo>

Information about the discovered dialog.

Intent

Wait for a UI5 dialog to open, optionally filtering by title or type. Use before interacting with any dialog content.

Guarantee

On success, returns a DialogInfo for the first matching open dialog.

Prerequisite

An action that triggers a dialog must have been executed.

Ai Context

UI5 dialogs live in sap-ui-static area, not the normal view tree. Always call this before confirmDialog() or dismissDialog() to ensure the dialog is open.

Sap Module

sap.m.Dialog, sap.m.MessageBox, sap.ui.comp.valuehelpdialog.ValueHelpDialog

Business Context

Wait for confirmation dialogs, value help dialogs, or message boxes in SAP apps.

Throws

ControlError if no matching dialog appears within the timeout.

Example

const info = await waitForDialog(page, { title: 'Confirm Delete' });