Skip to main content
Version: 1.x

Function: getSelectedRows()

getSelectedRows(page, tableId, options?): Promise<readonly number[]>

Ai

Returns the indices of selected rows.

Parameters​

page​

TablePage

Playwright Page (or compatible subset).

tableId​

string

The UI5 control ID.

options?​

TableOptions

Table options.

Returns​

Promise<readonly number[]>

Capability​

ui5.table.getSelectedRows

Intent​

Get the zero-based indices of all currently selected rows.

Guarantee​

Returns an array of zero-based row indices that are currently selected (empty array if none).

Ai Context​

Uses getSelectedIndices() for grid tables, getSelectedItems() for responsive tables.

Sap Module​

sap.m.Table, sap.ui.table.Table — selection state query

Business Context​

Verify or capture which rows the user has selected for subsequent actions.

Example​

`const sel = await getSelectedRows(page, 'myTable');`