import { launch } from '@puppeteer/browsers'; import type { Browser, BrowserCloseCallback } from '../api/Browser.js'; import { Connection } from '../cdp/Connection.js'; import type { SupportedBrowser } from '../common/SupportedBrowser.js'; import type { Viewport } from '../common/Viewport.js'; import { type GetIdFn } from '../util/incremental-id-generator.js'; import type { ChromeReleaseChannel, LaunchOptions } from './LaunchOptions.js'; import type { PuppeteerNode } from './PuppeteerNode.js'; /** * @internal */ export interface ResolvedLaunchArgs { isTempUserDataDir: boolean; userDataDir: string; executablePath: string; args: string[]; } /** * Describes a launcher - a class that is able to create and launch a browser instance. * * @public */ export declare abstract class BrowserLauncher { #private; /** * @internal */ puppeteer: PuppeteerNode; /** * @internal */ constructor(puppeteer: PuppeteerNode, browser: SupportedBrowser); get browser(): SupportedBrowser; launch(options?: LaunchOptions): Promise; abstract executablePath(channel?: ChromeReleaseChannel, validatePath?: boolean): string; abstract defaultArgs(object: LaunchOptions): string[]; /** * @internal */ protected abstract computeLaunchArguments(options: LaunchOptions): Promise; /** * @internal */ protected abstract cleanUserDataDir(path: string, opts: { isTemp: boolean; }): Promise; /** * @internal */ protected closeBrowser(browserProcess: ReturnType, cdpConnection?: Connection): Promise; /** * @internal */ protected waitForPageTarget(browser: Browser, timeout: number): Promise; /** * @internal */ protected createCdpSocketConnection(browserProcess: ReturnType, opts: { timeout: number; protocolTimeout: number | undefined; slowMo: number; idGenerator: GetIdFn; }): Promise; /** * @internal */ protected createCdpPipeConnection(browserProcess: ReturnType, opts: { timeout: number; protocolTimeout: number | undefined; slowMo: number; idGenerator: GetIdFn; }): Promise; /** * @internal */ protected createBiDiOverCdpBrowser(browserProcess: ReturnType, cdpConnection: Connection, closeCallback: BrowserCloseCallback, opts: { defaultViewport: Viewport | null; acceptInsecureCerts?: boolean; networkEnabled: boolean; }): Promise; /** * @internal */ protected createBiDiBrowser(browserProcess: ReturnType, closeCallback: BrowserCloseCallback, opts: { timeout: number; protocolTimeout: number | undefined; slowMo: number; idGenerator: GetIdFn; defaultViewport: Viewport | null; acceptInsecureCerts?: boolean; networkEnabled?: boolean; }): Promise; /** * @internal */ protected getProfilePath(): string; /** * @internal */ resolveExecutablePath(headless?: boolean | 'shell', validatePath?: boolean): string; } //# sourceMappingURL=BrowserLauncher.d.ts.map