Skip to main content
Version: 1.x

Function: initializeFETestLibrary()

initializeFETestLibrary(page, config, options?): Promise<FETestLibraryInstance>

Defined in: src/fe/fe-test-library.ts:416

Factory function to initialize the FE Test Library.

Parameters

page

FETestLibraryPage

Playwright Page (or compatible mock)

config

TestLibraryConfig

FE test library page object configuration

options?

FETestLibraryOptions

Optional initialization settings

Returns

Promise<FETestLibraryInstance>

Initialized FETestLibraryInstance

Intent

Initialize the SAP Fiori Elements OPA5 test library for Given/When/Then test execution.

Remarks

Injects browser-side scripts to load SAP FE test libraries and initialize OPA5 page objects. Optionally detects BTP WorkZone environment.

Example

const fe = await initializeFETestLibrary(page, {
onTheMainPage: {
ListReport: { appId: 'my.app', componentId: 'comp', entitySet: 'Items' },
},
});