import { Capabilities, Browser } from './swd.js'; import { BrowserType } from './browser.js'; import { CDPOptions } from './cdp/options.js'; export declare enum Using { id = "id", name = "name", className = "className", link = "link text", partialLink = "partial link text", css = "css selector", tag = "tag name", xpath = "xpath" } export declare enum Protocol { W3C = "W3C", JSONWire = "JSONWire" } export declare class WebDriver { private static _onGoingSessions; static defaultHeadless: boolean; private _driver; private _serverURL; get serverURL(): URL; private _resolveFindResult; /** * Create a SimpleWebDriver object which allows to interact with a webdriver server. * @deprecated Use {@link WebDriver.w3c} or {@link WebDriver.cdp} instead. * Will be removed in a future major version. * @param serverURL The URL of the webdriver server * @param protocol The type of protocol (see Protocol enum) */ constructor(serverURL: string, protocol?: Protocol); /** * Create a WebDriver that talks to a W3C WebDriver HTTP server * (chromedriver, geckodriver, msedgedriver, safaridriver...). * * @param serverURL Absolute http(s) URL of the WebDriver server. */ static w3c(serverURL: string): WebDriver; /** * Create a WebDriver that speaks Chrome DevTools Protocol directly with * a Chromium-based browser. The library launches and manages the browser * process itself (no external driver binary required). * * Only `startSession` / `stopSession` / `getStatus` are wired up today; * other operations throw until they land incrementally. * * @param options Browser launch configuration. */ static cdp(options?: CDPOptions): WebDriver; status(): Promise; start(browserType: BrowserType, capabilities?: Capabilities): Promise; static cleanSessions(): Promise; }