Skip to main content
Version: 1.x

Function: clickButton()

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

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​

intent.core.clickButton

Example​

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

await clickButton(ui5, 'Save');