Skip to main content
Version: 1.x

Function: getEntityCount()

getEntityCount(page, path, options?): Promise<number>

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

Ai

Reads the number of entities in a binding from the UI5 model.

Parameters

page

ODataPage

Playwright Page (or compatible subset).

path

string

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

options?

ODataOptions

OData options (timeout, modelName).

Returns

Promise<number>

The entity count (0 if no data or not an array).

Intent

Count the number of entities at a specific OData model path.

Ai Context

Returns array length from getData() at the path. Returns 0 if not an array.

Sap Module

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

Business Context

Verify expected entity counts in list bindings.

Example

const count = await getEntityCount(page, '/Products');