Skip to main content
Version: 1.x

Function: getModelProperty()

getModelProperty(page, path, options?): Promise<unknown>

Ai

Reads a single property from a UI5 OData model.

Parameters​

page​

ODataPage

Playwright Page (or compatible subset).

path​

string

OData model property path (must start with '/').

options?​

ODataOptions

OData options (timeout, modelName).

Returns​

Promise<unknown>

The property value, or undefined if not found.

Capability​

ui5.odata.getModelProperty

Intent​

Read a specific property value from the OData model.

Guarantee​

On success, returns the property value at the path, or undefined if not found.

Ai Context​

Uses model.getProperty() for single-value reads. More efficient than getModelData() when only one property is needed.

Sap Module​

sap.ui.model.odata.v2.ODataModel, sap.ui.model.odata.v4.ODataModel

Business Context​

Read individual entity properties for targeted assertions.

Example​

const name = await getModelProperty(page, '/Products(1)/Name');