import * as history from "./history"; import { Config } from "../config"; import { AsyncEmitter } from "../events"; import { BrowserConfig } from "../config/browser-config"; import type { Callstack } from "./history/callstack"; import type { WdProcess, WebdriverPool } from "../browser-pool/webdriver-pool"; import type { ProfilerRuntimeLike } from "../profiler/runtime/types"; export type BrowserOpts = { id: string; version?: string; state?: Record; emitter: AsyncEmitter; wdPool?: WebdriverPool; profiler?: ProfilerRuntimeLike; }; export type BrowserState = { testXReqId?: string; traceparent?: string; isBroken?: boolean; isLastTestFailed?: boolean; }; export type CustomCommand = { name: string; elementScope: boolean; }; export declare class Browser { protected _emitter: AsyncEmitter; protected _config: BrowserConfig; protected _debug: boolean; protected _session: WebdriverIO.Browser | null; protected _callstackHistory: Callstack | null; protected _state: BrowserState; protected _customCommands: Set; protected _wdPool?: WebdriverPool; protected _wdProcess: WdProcess | null; protected _exitError?: Error; protected _profiler: ProfilerRuntimeLike; /** This Promise is awaited after test is finished. Can be used for cleanup. Right now is used to wait for time travel snapshots to finish collecting */ protected _snapshotsPromiseRef: history.PromiseRef; id: string; version?: string; static create(this: new (config: Config, opts: BrowserOpts) => T, config: Config, opts: BrowserOpts): T; constructor(config: Config, opts: BrowserOpts); setHttpTimeout(timeout: number | null): void; restoreHttpTimeout(): void; applyState(state: Record): void; protected _addCommands(): void; protected _addSteps(): void; protected _extendStacktrace(): void; protected _addHistory(): void; protected _addExtendOptionsMethod(session: WebdriverIO.Browser): void; protected _getSessionOptsFromConfig(optNames?: string[]): Record; protected _startCollectingCustomCommands(): void; get fullId(): string; get publicAPI(): WebdriverIO.Browser; get sessionId(): string; get config(): BrowserConfig; get state(): BrowserState; get capabilities(): WebdriverIO.Capabilities; get callstackHistory(): Callstack; get snapshotsPromiseRef(): history.PromiseRef; get customCommands(): CustomCommand[]; get emitter(): AsyncEmitter; get exitError(): Error | undefined; }