Skip to main content
Version: 1.x

Function: sortByColumn()

sortByColumn(page, tableId, columnIndex, options?): Promise<void>

Defined in: src/modules/table-filter-sort.ts:179

Sorts a table by a specific column.

Parameters

page

TableFilterSortPage

Playwright Page (or compatible subset).

tableId

string

The UI5 control ID.

columnIndex

number

Zero-based column index.

options?

TableSortOptions

Sort options (descending defaults to false).

Returns

Promise<void>

Intent

Sort a UI5 table by a specified column in ascending or descending order.

Throws

ControlError if the sort cannot be applied.

Example

await sortByColumn(page, 'myTable', 0, { descending: true });