Skip to main content
Version: 1.x

Interface: FETestLibraryPage

Minimal page interface required by the FE Test Library.

Remarks​

Abstracts Playwright's Page to the subset needed for script injection and WorkZone detection. This allows unit testing with lightweight mocks.

Example​

const page: FETestLibraryPage = playwrightPage;
await initializeFETestLibrary(page, config);

Methods​

evaluate()​

evaluate<TResult>(pageFunction, arg?): Promise<TResult>

Executes a script in the browser context and returns the result.

Type Parameters​

TResult​

TResult

Parameters​

pageFunction​

string

arg?​

unknown

Returns​

Promise<TResult>


locator()​

locator(selector): object

Returns a locator for the given CSS selector, with a count() method.

Parameters​

selector​

string

Returns​

count()​

count(): Promise<number>

Returns the number of elements matching the selector.

Returns​

Promise<number>