UNPKG

testplane

Version:

Tests framework based on mocha and wdio

16 lines (15 loc) 696 B
import type { CDPEvent, CDPRequest } from "./types"; import type { Browser } from "../types"; type OnEventMessageFn = (cdpEventMessage: CDPEvent) => unknown; export declare class CDPConnection { onEventMessage: OnEventMessageFn | null; private readonly _wsConnection; private constructor(); /** @description Creates CDPConnection without establishing it */ static create(browser: Browser): Promise<CDPConnection>; close(): void; private _onMessage; /** @description Performs high-level CDP request with retries and timeouts */ request<T = void>(method: CDPRequest["method"], { params, sessionId }?: Omit<CDPRequest, "id" | "method">): Promise<T>; } export {};