Skip to main content
Version: 1.x

Function: getCurrentHash()

getCurrentHash(page): Promise<string>

Ai

Returns the current URL hash (without leading '#').

Parameters​

page​

NavigationPage

Playwright Page (or compatible subset).

Returns​

Promise<string>

The current hash string.

Capability​

ui5Navigation.getCurrentHash

Intent​

Read the current FLP navigation hash to determine which app is active.

Guarantee​

Returns the current hash string without the leading '#'.

Ai Context​

Pure read operation (no stability wait). Use for assertions or conditional navigation.

Sap Module​

sap.ushell.Container — Read current FLP hash from window.location.hash

Business Context​

Determine the current active SAP Fiori app from the URL hash.

Example​

const hash = await getCurrentHash(page);
// 'PurchaseOrder-manage'