Skip to main content
Version: 1.x

Function: initializeFETestLibrary()

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

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.

Capability​

fe.listReport.getTable

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' },
},
});