UNPKG

@scraping.house/commons

Version:
27 lines 1.09 kB
import { Browser, BrowserContext, BrowserContextOptions, LaunchOptions, Page } from 'playwright-core'; export interface ModuleOptions { browser: Browser; context: BrowserContext; page: Page; authenticatedContextPath: string; } export interface ModuleInitializationOptions { browser: 'chrome' | 'firefox' | 'webkit'; launchOptions: LaunchOptions; contextOptions: BrowserContextOptions | undefined; authenticatedContextPath: string; } export default abstract class AbstractModule { protected browser: Browser; protected context: BrowserContext; protected page: Page; protected authenticatedContextPath: string; protected static readonly BASE_URL: string; protected static initOptions({ browser, launchOptions, contextOptions, authenticatedContextPath }: ModuleInitializationOptions): Promise<ModuleOptions>; constructor({ browser, context, page, authenticatedContextPath }: ModuleOptions); /** * Function closes page, context and browser */ close(): Promise<void>; } //# sourceMappingURL=abstract-module.d.ts.map