Skip to main content
Version: 1.x

Function: getControlProperty()

getControlProperty(page, controlId, propertyName): Promise<unknown>

Retrieves a control property via page.evaluate() using the bridge.

Parameters​

page​

MatcherPage

The page (or minimal MatcherPage) to evaluate on.

controlId​

string

The ID of the UI5 control.

propertyName​

string

The property to read (e.g., 'text', 'visible').

Returns​

Promise<unknown>

The property value from the browser context.

Intent​

Read a single property value from a UI5 control for matcher assertions.

Capability​

matchers.getControlProperty

Guarantee​

On success, returns the property value from the control (may be undefined for missing properties).

Remarks​

Ensures the bridge is injected, then executes the getter method for the given property on the target control. Mirrors the logic from ClassicUI5Adapter.getControlProperty().

Example​

const value = await getControlProperty(page, 'btn1', 'text');