/**
 * @license
 * Copyright 2025 Steven Roussey <sroussey@gmail.com>
 * SPDX-License-Identifier: Apache-2.0
 */
import type { AccessibilityTree, AriaRole, ClickOptions, ElementRef, SnapshotOptions, WaitOptions } from "./IBrowserContext";
export declare abstract class CDPBrowserBackend {
    protected _refMap: Map<string, number | null>;
    protected _refCounter: {
        count: number;
    };
    /** Send a CDP command. Subclasses wire this to their transport. */
    protected abstract cdp(method: string, params?: Record<string, unknown>): Promise<unknown>;
    /** Human-readable backend name for error messages. */
    protected abstract readonly backendName: string;
    /** Evaluate a JavaScript expression in the page and return the result. */
    protected abstract evaluateInPage<T>(script: string): Promise<T>;
    /**
     * Resolve an ElementRef to a backendDOMNodeId. Throws if unknown.
     */
    protected resolveRefToNodeId(ref: ElementRef): number;
    /**
     * Get the bounding box of a DOM node by backendDOMNodeId via CDP.
     */
    protected getBoundingBox(backendNodeId: number): Promise<{
        x: number;
        y: number;
        width: number;
        height: number;
    }>;
    /**
     * Get the root nodeId of the DOM document.
     */
    protected getDocumentRootNodeId(): Promise<number>;
    snapshot(_options?: SnapshotOptions): Promise<AccessibilityTree>;
    click(ref: ElementRef, options?: ClickOptions): Promise<void>;
    fill(ref: ElementRef, value: string, _options?: WaitOptions): Promise<void>;
    selectOption(ref: ElementRef, values: string | readonly string[], _options?: WaitOptions): Promise<void>;
    hover(ref: ElementRef, _options?: WaitOptions): Promise<void>;
    clickByRole(role: AriaRole, name: string, options?: ClickOptions): Promise<void>;
    fillByLabel(label: string, value: string, _options?: WaitOptions): Promise<void>;
    innerHTML(ref: ElementRef): Promise<string>;
    textContent(ref: ElementRef): Promise<string | null>;
    attribute(ref: ElementRef, name: string): Promise<string | null>;
    querySelector(selector: string): Promise<ElementRef | null>;
    querySelectorAll(selector: string): Promise<readonly ElementRef[]>;
    pressKey(key: string, _options?: WaitOptions): Promise<void>;
    type(text: string, _options?: WaitOptions): Promise<void>;
    scroll(x: number, y: number, ref?: ElementRef): Promise<void>;
    uploadFile(ref: ElementRef, paths: string | readonly string[]): Promise<void>;
}
//# sourceMappingURL=CDPBrowserBackend.d.ts.map