Skip to main content
Version: 1.x

Function: detectTableType()

detectTableType(page, tableId): Promise<TableInfo>

Defined in: src/modules/table.ts:176

Ai

Detects the UI5 table variant for a given control ID.

Parameters

page

TablePage

Playwright Page (or compatible subset).

tableId

string

The UI5 control ID.

Returns

Promise<TableInfo>

Intent

Identify the table type (sap.m.Table, sap.ui.table.Table, SmartTable, MDC Table) so subsequent table operations use the correct API calls.

Guarantee

On success, returns a TableInfo with correct variant and effectiveId.

Prerequisite

The tableId must reference a valid UI5 table control in the DOM.

Ai Context

Always call this first before other table operations. SmartTable wraps an inner table; the effectiveId points to the actual table control inside.

Sap Module

sap.ui.comp.smarttable.SmartTable, sap.m.Table, sap.ui.table.Table, sap.ui.mdc.Table

Business Context

Unified table detection across all 6 SAP UI5 table variants.

Example

`const info = await detectTableType(page, 'myTable');`