UNPKG

playwright-session

Version:

Visual Debugger for Playwright automation.

17 lines (16 loc) 943 B
import type { ChromiumBrowser, ChromiumBrowserContext, Page } from "playwright"; declare type InitializeRecorderResponse = { page: Page; context: ChromiumBrowserContext; }; /** * Bootstraps session recording on top of the open browser connection. * Session recording will be saved to a file defined by `sessionFilePath` argument. * Once bootstrapped, this function will return a new BrowserContext & Page. * @param browser ChromiumBrowser Browser instance. * @param [sessionFilePath] [OPTIONAL] Path where session recoeding file should be saved. * Defaults to `${process.cwd()}/playwright-events-${new Date().toISOString()}.ldjson`. * @param contextOpts [OPTIONAL] Options that can be passed to `browser.newContext` call, used when creating new BrowserContext. */ export default function initializeRecorder(browser: ChromiumBrowser, sessionFilePath?: string, contextOpts?: any): Promise<InitializeRecorderResponse>; export {};