Skip to main content
Version: 1.x

Function: navigateToSpace()

navigateToSpace(page, spaceTitle, options?): Promise<void>

Ai

Navigates to an FLP Space Tab by its visible title text.

Parameters

page

SpaceNavigationPage

Playwright Page (or compatible subset with getByText()).

spaceTitle

string

Visible title text of the FLP Space Tab.

options?

SpaceNavigationOptions

Navigation options including timeout and exact match control.

Returns

Promise<void>

Intent

Navigate to a specific Space Tab in the modern FLP layout. Use when the SAP FLP uses Space-based navigation (IconTabFilter tabs at the top).

Guarantee

On success, the Space Tab is clicked and UI5 stability is reached.

Prerequisite

The FLP must be loaded and use a Space/Section layout (BTP Work Zone or modern S/4HANA FLP).

Ai Context

Uses Playwright-native getByText() because sap.m.IconTabFilter extends sap.ui.core.Item and does NOT have press(), firePress(), fireSelect(), or fireTap() methods. The UI5-native strategy fallback (getDomRef().click()) does NOT reliably switch Space Tabs. Playwright DOM click is the ONLY reliable approach.

Sap Module

sap.m.IconTabFilter — FLP Space Tab (no press/firePress methods)

Business Context

Navigate between FLP Spaces in modern SAP BTP Work Zone or S/4HANA FLP.

Throws

NavigationError if spaceTitle is empty.

Example

// Navigate to the "Procurement" space tab (exact match, default)
await navigateToSpace(page, 'Procurement');

// Navigate with partial match (e.g., "Procure" matches "Procurement")
await navigateToSpace(page, 'Procure', { exact: false });

// Navigate with custom timeout
await navigateToSpace(page, 'Procurement', { timeout: 15_000 });