Skip to main content
Version: 1.x

Function: getModelData()

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

Defined in: src/modules/odata.ts:180

Ai

Retrieves data from a UI5 OData model at the given path.

Parameters

page

ODataPage

Playwright Page (or compatible subset).

path

string

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

options?

ODataOptions

OData options (timeout, modelName).

Returns

Promise<unknown>

The data at the given path (array, object, or primitive).

Intent

Read data from the UI5 OData model at a specific binding path.

Ai Context

Accesses the component's OData model via getData() or getProperty(). Path must start with '/'. Use modelName option for named models.

Sap Module

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

Business Context

Read OData entity data from the UI5 model layer for data-level assertions.

Throws

ODataError if path is invalid or model/data not found.

Example

const products = await getModelData(page, '/Products');
const single = await getModelData(page, '/Products(1)', { modelName: 'catalog' });