import { type Browser, type BrowserContext, type Page } from "playwright"; /** Options for a dedicated, package-owned Chromium browser fixture. */ export interface BrowserFixtureOptions { /** Launch headless Chromium (the default). Set false only with an available display. */ readonly headless?: boolean; /** Directory in which bounded, secret-safe browser evidence is written. */ readonly artifactsDirectory?: string; /** Default bound for URL capture waits. */ readonly timeoutMs?: number; } /** Options accepted by {@link BrowserFixture.waitForUrl}. */ export interface BrowserFixtureWaitOptions { /** Maximum time to wait for the opener URL. */ readonly timeoutMs?: number; /** Cancel the wait without affecting the browser fixture. */ readonly signal?: AbortSignal; } /** A browser owner that is independent of Pi or any application server. */ export interface BrowserFixture { readonly browser: Browser; readonly context: BrowserContext; readonly page: Page; /** Node runtime command to pass to an application's explicit browser opener. */ readonly openerCommand: string; /** Return child-scoped environment values for the application under test. */ childEnvironment(base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv; /** Wait for one URL captured by this fixture's opener. */ waitForUrl(options?: BrowserFixtureWaitOptions): Promise; /** Close all resources owned by this fixture. Safe to call repeatedly. */ close(): Promise; } /** Create and launch an isolated Playwright Chromium browser fixture. */ export declare function createBrowserFixture(options?: BrowserFixtureOptions): Promise; /** Create a fixture, run a callback, and always close the fixture. */ export declare function withBrowserFixture(options: BrowserFixtureOptions, callback: (fixture: BrowserFixture) => T | Promise): Promise; /** Create a fixture with default options, run a callback, and always close it. */ export declare function withBrowserFixture(callback: (fixture: BrowserFixture) => T | Promise): Promise;