Skip to main content

Function: clickButton()

clickButton(ui5, text): Promise<IntentResult<void>>

Defined in: src/intents/core-wrappers.ts:233

Clicks a sap.m.Button control matching the given button text.

Parameters​

ui5​

UI5HandlerSlice

UI5 interaction handler.

text​

string

Visible button text (e.g. 'Save', 'Submit').

Returns​

Promise<IntentResult<void>>

An IntentResult<void> describing the outcome.

Intent​

Click a button by its visible label, not by ID.

Capability​

Works across locales when button text is locale-stable.

Example​

import { clickButton } from '#intents/core-wrappers.js';

await clickButton(ui5, 'Save');