Skip to main content
Version: 1.x

Function: clickButton()

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

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

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');