import { Browser, BrowserOpts } from "./browser"; import { Camera, CaptureViewportImageOpts } from "./camera"; import { ClientBridge } from "./client-bridge"; import { Config } from "../config"; import { Image } from "../image"; import type { CalibrationResult, Calibrator } from "./calibrator"; import type { SessionOptions } from "./types"; import { Page } from "puppeteer-core"; import { CDP } from "./cdp"; import { WSDriverRequestAgent } from "./wsdriver"; import type * as browserSideUtilsImplementation from "./client-scripts/browser-utils/implementation"; interface ScrollByParams { x: number; y: number; selector?: string; } export declare const getActivePuppeteerPage: (session: WebdriverIO.Browser) => Promise; export declare class ExistingBrowser extends Browser { protected _camera: Camera; protected _meta: Record; protected _calibration?: CalibrationResult; protected _browserSideUtils?: ClientBridge; protected _cdp: CDP | null; protected _wsDriver: WSDriverRequestAgent | null; protected _tags: Set; constructor(config: Config, opts: BrowserOpts); init({ sessionId, sessionCaps, sessionOpts }: SessionOptions, calibrator: Calibrator): Promise; markAsBroken({ stubBrowserCommands }?: { stubBrowserCommands?: boolean | undefined; }): void; quit(): void; open(url: string): Promise; evalScript(script: string): Promise; injectScript(script: string): Promise; get shouldUsePixelRatio(): boolean; get isWebdriverProtocol(): boolean; get needsCompatLib(): boolean; captureViewportImage(opts?: CaptureViewportImageOpts): Promise; scrollBy(params: ScrollByParams): Promise; protected _attachSession({ sessionId, sessionCaps, sessionOpts, }: SessionOptions): Promise; protected _initMeta(): Record; protected _takeScreenshot(): Promise; protected _addCommands(): void; protected _overrideGetElementsList(session: WebdriverIO.Browser): void; protected _addMetaAccessCommands(session: WebdriverIO.Browser): void; protected _decorateUrlMethod(session: WebdriverIO.Browser): void; protected _resolveUrl(uri: string): string; protected _performBidiIsolation(sessionOpts: SessionOptions["sessionOpts"]): Promise; protected _performCdpIsolation(sessionOpts: SessionOptions["sessionOpts"]): Promise; protected _performIsolation({ sessionCaps, sessionOpts, }: Pick): Promise; protected _prepareSession(): Promise; protected _setOrientation(orientation: string | null): Promise; protected _setWindowSize(size: { width: number; height: number; } | `${number}x${number}` | null): Promise; protected _performCalibration(calibrator: Calibrator): Promise; protected _initBrowserSideUtils(): Promise>; _stubCommands(): void; get meta(): Record; get tags(): string[]; get cdp(): CDP | null; get camera(): Camera; } export {};