sap_handle_popup
Read and respond to the current SAP GUI popup or modal dialog by inspecting content, confirming, cancelling, pressing a button, or taking a safe automatic action.
Instructions
Read and optionally act on the current popup/modal dialog.
Use when active_window shows wnd[1] or higher. Combines popup inspection and response in a single call.
Actions:
read: return popup content without acting (default)
confirm: press OK/Yes/Continue/Enter on the popup
cancel: press Cancel (or F12) on the popup; never No, which on a save prompt drops the changes
press: press a specific button by its text or tooltip
auto: take only a clearly safe action; otherwise return the popup read-only
A press that may save (a Save button, or Yes/OK on a popup about saving, e.g. "Save the changes first?") asks the user first, like F11 in sap_send_key. So does any answer but Cancel when the popup's question cannot be read (question_readable: false; SAP GUI's Edge browser control). On such a popup, confirm never falls back to Enter, and auto only reads. An accepted press reports confirmed_by_user: true.
Returns the popup contents plus classification, requested action, and post-action screen/popup state when something was pressed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | read | |
| button_text | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||