Skip to content

@serenity-is/corelib / getWindowHistory

Function: getWindowHistory()

getWindowHistory(opt?): History

Defined in: src/base/services.ts:92

Returns the window history object. Applications should use the history through this function instead of referencing window.history directly, so tests can replace it, e.g. to make back() take effect at once, as jsdom runs it asynchronously.

Parameters

opt?

pass { top: true } to get the top window's history.

top?

boolean

Returns

History

The requested History.