UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

644 lines (643 loc) • 27.1 kB
import type { BrowserClientWindow, BrowserUserContext } from './browser.js'; import './browser.js'; import type { EmptyResult, JsInt, JsUint } from './common.js'; import './common.js'; import type { ScriptNodeRemoteValue, ScriptSerializationOptions, ScriptSharedReference } from './script.js'; import './script.js'; import type { SessionUserPromptHandlerType } from './session.js'; import './session.js'; import { Domain, type EventDescriptor } from '../domain.js'; export type BrowsingContextBrowsingContext = string; export type BrowsingContextInfoList = Array<BrowsingContextInfo>; export interface BrowsingContextBaseInfo { children: BrowsingContextInfoList | null; clientWindow: BrowserClientWindow; context: BrowsingContextBrowsingContext; originalOpener: BrowsingContextBrowsingContext | null; url: string; userContext: BrowserUserContext; parent?: BrowsingContextBrowsingContext | null; } export interface BrowsingContextInfo { children: BrowsingContextInfoList | null; clientWindow: BrowserClientWindow; context: BrowsingContextBrowsingContext; originalOpener: BrowsingContextBrowsingContext | null; url: string; userContext: BrowserUserContext; parent?: BrowsingContextBrowsingContext | null; } export type BrowsingContextLocator = BrowsingContextAccessibilityLocator | BrowsingContextCssLocator | BrowsingContextContextLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator; export interface BrowsingContextAccessibilityLocator { type: "accessibility"; value: BrowsingContextAccessibilityLocatorValue; } export interface BrowsingContextCssLocator { type: "css"; value: string; } export interface BrowsingContextContextLocator { type: "context"; value: BrowsingContextContextLocatorValue; } export interface BrowsingContextInnerTextLocator { type: "innerText"; value: string; ignoreCase?: boolean; matchType?: BrowsingContextInnerTextLocatorMatchType; maxDepth?: JsUint; } export interface BrowsingContextXPathLocator { type: "xpath"; value: string; } export type BrowsingContextNavigation = string; export type BrowsingContextDownload = string; export interface BrowsingContextBaseNavigationInfo { context: BrowsingContextBrowsingContext; navigation: BrowsingContextNavigation | null; timestamp: JsUint; url: string; userContext?: BrowserUserContext; } export interface BrowsingContextNavigationInfo { context: BrowsingContextBrowsingContext; navigation: BrowsingContextNavigation | null; timestamp: JsUint; url: string; userContext?: BrowserUserContext; } export type BrowsingContextReadinessState = "none" | "interactive" | "complete"; export type BrowsingContextUserPromptType = "alert" | "beforeunload" | "confirm" | "prompt"; export interface BrowsingContextActivate { method: "browsingContext.activate"; params: BrowsingContextActivateParameters; } export interface BrowsingContextActivateParameters { context: BrowsingContextBrowsingContext; } export type BrowsingContextActivateResult = EmptyResult; export interface BrowsingContextCaptureScreenshot { method: "browsingContext.captureScreenshot"; params: BrowsingContextCaptureScreenshotParameters; } export interface BrowsingContextCaptureScreenshotParameters { context: BrowsingContextBrowsingContext; origin?: BrowsingContextCaptureScreenshotParametersOrigin; format?: BrowsingContextImageFormat; clip?: BrowsingContextClipRectangle; imageSize?: BrowsingContextImageSize; } export interface BrowsingContextImageFormat { type: string; quality?: number; } export interface BrowsingContextImageSize { maxWidth?: JsUint; maxHeight?: JsUint; } export type BrowsingContextClipRectangle = BrowsingContextBoxClipRectangle | BrowsingContextElementClipRectangle; export interface BrowsingContextElementClipRectangle { type: "element"; element: ScriptSharedReference; } export interface BrowsingContextBoxClipRectangle { type: "box"; x: number; y: number; width: number; height: number; } export interface BrowsingContextCaptureScreenshotResult { data: string; } export interface BrowsingContextClose { method: "browsingContext.close"; params: BrowsingContextCloseParameters; } export interface BrowsingContextCloseParameters { context: BrowsingContextBrowsingContext; promptUnload?: boolean; } export type BrowsingContextCloseResult = EmptyResult; export interface BrowsingContextCreate { method: "browsingContext.create"; params: BrowsingContextCreateParameters; } export type BrowsingContextCreateType = "tab" | "window"; export interface BrowsingContextCreateParameters { type: BrowsingContextCreateType; referenceContext?: BrowsingContextBrowsingContext; background?: boolean; userContext?: BrowserUserContext; } export interface BrowsingContextCreateResult { context: BrowsingContextBrowsingContext; userContext?: BrowserUserContext; } export interface BrowsingContextGetTree { method: "browsingContext.getTree"; params: BrowsingContextGetTreeParameters; } export interface BrowsingContextGetTreeParameters { maxDepth?: JsUint; root?: BrowsingContextBrowsingContext; } export interface BrowsingContextGetTreeResult { contexts: BrowsingContextInfoList; } export interface BrowsingContextHandleUserPrompt { method: "browsingContext.handleUserPrompt"; params: BrowsingContextHandleUserPromptParameters; } export interface BrowsingContextHandleUserPromptParameters { context: BrowsingContextBrowsingContext; accept?: boolean; userText?: string; } export type BrowsingContextHandleUserPromptResult = EmptyResult; export interface BrowsingContextLocateNodes { method: "browsingContext.locateNodes"; params: BrowsingContextLocateNodesParameters; } export interface BrowsingContextLocateNodesParameters { context: BrowsingContextBrowsingContext; locator: BrowsingContextLocator; maxNodeCount?: JsUint; serializationOptions?: ScriptSerializationOptions; startNodes?: Array<ScriptSharedReference>; } export interface BrowsingContextLocateNodesResult { nodes: Array<ScriptNodeRemoteValue>; } export interface BrowsingContextNavigate { method: "browsingContext.navigate"; params: BrowsingContextNavigateParameters; } export interface BrowsingContextNavigateParameters { context: BrowsingContextBrowsingContext; url: string; wait?: BrowsingContextReadinessState; } export interface BrowsingContextNavigateResult { navigation: BrowsingContextNavigation | null; url: string; } export interface BrowsingContextPrint { method: "browsingContext.print"; params: BrowsingContextPrintParameters; } export interface BrowsingContextPrintParameters { context: BrowsingContextBrowsingContext; background?: boolean; margin?: BrowsingContextPrintMarginParameters; orientation?: BrowsingContextPrintParametersOrientation; page?: BrowsingContextPrintPageParameters; pageRanges?: Array<JsUint | string>; scale?: number; shrinkToFit?: boolean; } export interface BrowsingContextPrintMarginParameters { bottom?: number; left?: number; right?: number; top?: number; } export interface BrowsingContextPrintPageParameters { height?: number; width?: number; } export interface BrowsingContextPrintResult { data: string; } export interface BrowsingContextReload { method: "browsingContext.reload"; params: BrowsingContextReloadParameters; } export interface BrowsingContextReloadParameters { context: BrowsingContextBrowsingContext; ignoreCache?: boolean; wait?: BrowsingContextReadinessState; } export type BrowsingContextReloadResult = BrowsingContextNavigateResult; export interface BrowsingContextSetBypassCsp { method: "browsingContext.setBypassCSP"; params: BrowsingContextSetBypassCspParameters; } export interface BrowsingContextSetBypassCspParameters { bypass: true | null; contexts?: Array<BrowsingContextBrowsingContext>; userContexts?: Array<BrowserUserContext>; } export type BrowsingContextSetBypassCspResult = EmptyResult; export interface BrowsingContextSetViewport { method: "browsingContext.setViewport"; params: BrowsingContextSetViewportParameters; } export interface BrowsingContextSetViewportParameters { context?: BrowsingContextBrowsingContext; viewport?: BrowsingContextViewport | null; devicePixelRatio?: number | null; userContexts?: Array<BrowserUserContext>; } export interface BrowsingContextViewport { width: JsUint; height: JsUint; } export type BrowsingContextSetViewportResult = EmptyResult; export interface BrowsingContextStartScreencast { method: "browsingContext.startScreencast"; params: BrowsingContextStartScreencastParameters; } export interface BrowsingContextStartScreencastParameters { context: BrowsingContextBrowsingContext; destinationFolder?: string; mimeType?: string; video?: BrowsingContextMediaTrackConstraints; audio?: boolean; } export interface BrowsingContextMediaTrackConstraints { width?: JsUint; height?: JsUint; frameRate?: JsUint; } export interface BrowsingContextStartScreencastResult { screencast: BrowsingContextScreencast; path: string; } export type BrowsingContextScreencast = string; export interface BrowsingContextStopScreencast { method: "browsingContext.stopScreencast"; params: BrowsingContextStopScreencastParameters; } export interface BrowsingContextStopScreencastParameters { screencast: BrowsingContextScreencast; } export interface BrowsingContextStopScreencastResult { path: string; error?: string; } export interface BrowsingContextTraverseHistory { method: "browsingContext.traverseHistory"; params: BrowsingContextTraverseHistoryParameters; } export interface BrowsingContextTraverseHistoryParameters { context: BrowsingContextBrowsingContext; delta: JsInt; } export type BrowsingContextTraverseHistoryResult = EmptyResult; export interface BrowsingContextContextCreated { method: "browsingContext.contextCreated"; params: BrowsingContextContextCreatedParameters; } export interface BrowsingContextContextDestroyed { method: "browsingContext.contextDestroyed"; params: BrowsingContextInfo; } export interface BrowsingContextNavigationStarted { method: "browsingContext.navigationStarted"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextFragmentNavigated { method: "browsingContext.fragmentNavigated"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextHistoryUpdated { method: "browsingContext.historyUpdated"; params: BrowsingContextHistoryUpdatedParameters; } export interface BrowsingContextHistoryUpdatedParameters { context: BrowsingContextBrowsingContext; timestamp: JsUint; url: string; userContext?: BrowserUserContext; } export interface BrowsingContextDomContentLoaded { method: "browsingContext.domContentLoaded"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextLoad { method: "browsingContext.load"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextDownloadWillBegin { method: "browsingContext.downloadWillBegin"; params: BrowsingContextDownloadWillBeginParams; } export interface BrowsingContextDownloadWillBeginParams { download: BrowsingContextDownload; suggestedFilename: string; context: BrowsingContextBrowsingContext; navigation: BrowsingContextNavigation | null; timestamp: JsUint; url: string; userContext?: BrowserUserContext; } export interface BrowsingContextDownloadEnd { method: "browsingContext.downloadEnd"; params: BrowsingContextDownloadEndParams; } export type BrowsingContextDownloadEndParams = BrowsingContextDownloadEndParams_CanceledParams | BrowsingContextDownloadEndParams_CompleteParams; export interface BrowsingContextNavigationAborted { method: "browsingContext.navigationAborted"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextNavigationCommitted { method: "browsingContext.navigationCommitted"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextNavigationFailed { method: "browsingContext.navigationFailed"; params: BrowsingContextNavigationInfo; } export interface BrowsingContextUserPromptClosed { method: "browsingContext.userPromptClosed"; params: BrowsingContextUserPromptClosedParameters; } export interface BrowsingContextUserPromptClosedParameters { context: BrowsingContextBrowsingContext; accepted: boolean; type: BrowsingContextUserPromptType; userContext?: BrowserUserContext; userText?: string; } export interface BrowsingContextUserPromptOpened { method: "browsingContext.userPromptOpened"; params: BrowsingContextUserPromptOpenedParameters; } export interface BrowsingContextUserPromptOpenedParameters { context: BrowsingContextBrowsingContext; handler: SessionUserPromptHandlerType; message: string; type: BrowsingContextUserPromptType; userContext?: BrowserUserContext; defaultValue?: string; } export interface BrowsingContextContextCreatedParameters { children: BrowsingContextInfoList | null; clientWindow: BrowserClientWindow; context: BrowsingContextBrowsingContext; originalOpener: BrowsingContextBrowsingContext | null; url: string; userContext: BrowserUserContext; parent?: BrowsingContextBrowsingContext | null; hasPlannedNavigation?: boolean; } export type BrowsingContextInnerTextLocatorMatchType = "full" | "partial"; export type BrowsingContextCaptureScreenshotParametersOrigin = "viewport" | "document"; export type BrowsingContextPrintParametersOrientation = "portrait" | "landscape"; export interface BrowsingContextDownloadEndParams_CanceledParams { status: "canceled"; download: BrowsingContextDownload; context: BrowsingContextBrowsingContext; navigation: BrowsingContextNavigation | null; timestamp: JsUint; url: string; userContext?: BrowserUserContext; } export interface BrowsingContextDownloadEndParams_CompleteParams { status: "complete"; download: BrowsingContextDownload; filepath: string | null; context: BrowsingContextBrowsingContext; navigation: BrowsingContextNavigation | null; timestamp: JsUint; url: string; userContext?: BrowserUserContext; } export interface BrowsingContextAccessibilityLocatorValue { name?: string; role?: string; } export interface BrowsingContextContextLocatorValue { context: BrowsingContextBrowsingContext; } export interface BrowsingContextMozGetTreeParameters { maxDepth?: JsUint; root?: BrowsingContextBrowsingContext; scope?: "chrome" | "content"; } /** * This is an unsupported API. No compatibility guarantees are provided. * It tracks the W3C WebDriver BiDi specification directly. As the specification * evolves, this API will change or be removed without prior notice. */ export declare class BrowsingContext extends Domain { /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-contextCreated */ static readonly CONTEXT_CREATED: EventDescriptor<BrowsingContextContextCreatedParameters>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-contextDestroyed */ static readonly CONTEXT_DESTROYED: EventDescriptor<BrowsingContextInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-domContentLoaded */ static readonly DOM_CONTENT_LOADED: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadEnd */ static readonly DOWNLOAD_END: EventDescriptor<BrowsingContextDownloadEndParams>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadWillBegin */ static readonly DOWNLOAD_WILL_BEGIN: EventDescriptor<BrowsingContextDownloadWillBeginParams>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-fragmentNavigated */ static readonly FRAGMENT_NAVIGATED: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-historyUpdated */ static readonly HISTORY_UPDATED: EventDescriptor<BrowsingContextHistoryUpdatedParameters>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-load */ static readonly LOAD: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationAborted */ static readonly NAVIGATION_ABORTED: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationCommitted */ static readonly NAVIGATION_COMMITTED: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationFailed */ static readonly NAVIGATION_FAILED: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationStarted */ static readonly NAVIGATION_STARTED: EventDescriptor<BrowsingContextNavigationInfo>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-userPromptClosed */ static readonly USER_PROMPT_CLOSED: EventDescriptor<BrowsingContextUserPromptClosedParameters>; /** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-userPromptOpened */ static readonly USER_PROMPT_OPENED: EventDescriptor<BrowsingContextUserPromptOpenedParameters>; static readonly ReadinessState: Readonly<{ readonly NONE: "none"; readonly INTERACTIVE: "interactive"; readonly COMPLETE: "complete"; }>; static readonly UserPromptType: Readonly<{ readonly ALERT: "alert"; readonly BEFOREUNLOAD: "beforeunload"; readonly CONFIRM: "confirm"; readonly PROMPT: "prompt"; }>; static readonly CreateType: Readonly<{ readonly TAB: "tab"; readonly WINDOW: "window"; }>; static readonly InnerTextLocatorMatchType: Readonly<{ readonly FULL: "full"; readonly PARTIAL: "partial"; }>; static readonly CaptureScreenshotParametersOrigin: Readonly<{ readonly VIEWPORT: "viewport"; readonly DOCUMENT: "document"; }>; static readonly PrintParametersOrientation: Readonly<{ readonly PORTRAIT: "portrait"; readonly LANDSCAPE: "landscape"; }>; static create(driver: unknown): Promise<BrowsingContext>; /** * @param {BrowsingContextActivateParameters} params * @param {BrowsingContextBrowsingContext} params.context * @returns {Promise<void>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-activate */ activate(params: BrowsingContextActivateParameters): Promise<void>; /** * @param {BrowsingContextCaptureScreenshotParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {BrowsingContextCaptureScreenshotParametersOrigin} [params.origin] * @param {BrowsingContextImageFormat} [params.format] * @param {BrowsingContextClipRectangle} [params.clip] * @param {BrowsingContextImageSize} [params.imageSize] * @returns {Promise<BrowsingContextCaptureScreenshotResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot */ captureScreenshot(params: BrowsingContextCaptureScreenshotParameters): Promise<BrowsingContextCaptureScreenshotResult>; /** * @param {BrowsingContextCloseParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {boolean} [params.promptUnload] * @returns {Promise<void>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-close */ close(params: BrowsingContextCloseParameters): Promise<void>; /** * @param {BrowsingContextCreateParameters} params * @param {BrowsingContextCreateType} params.type * @param {BrowsingContextBrowsingContext} [params.referenceContext] * @param {boolean} [params.background] * @param {BrowserUserContext} [params.userContext] * @returns {Promise<BrowsingContextCreateResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-create */ create(params: BrowsingContextCreateParameters): Promise<BrowsingContextCreateResult>; /** * @param {BrowsingContextGetTreeParameters} params * @param {JsUint} [params.maxDepth] * @param {BrowsingContextBrowsingContext} [params.root] * @returns {Promise<BrowsingContextGetTreeResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-getTree */ getTree(params: BrowsingContextGetTreeParameters): Promise<BrowsingContextGetTreeResult>; /** * @param {BrowsingContextHandleUserPromptParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {boolean} [params.accept] * @param {string} [params.userText] * @returns {Promise<void>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-handleUserPrompt */ handleUserPrompt(params: BrowsingContextHandleUserPromptParameters): Promise<void>; /** * @param {BrowsingContextLocateNodesParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {BrowsingContextLocator} params.locator * @param {JsUint} [params.maxNodeCount] * @param {ScriptSerializationOptions} [params.serializationOptions] * @param {Array<ScriptSharedReference>} [params.startNodes] * @returns {Promise<BrowsingContextLocateNodesResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-locateNodes */ locateNodes(params: BrowsingContextLocateNodesParameters): Promise<BrowsingContextLocateNodesResult>; /** * @param {BrowsingContextNavigateParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {string} params.url * @param {BrowsingContextReadinessState} [params.wait] * @returns {Promise<BrowsingContextNavigateResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-navigate */ navigate(params: BrowsingContextNavigateParameters): Promise<BrowsingContextNavigateResult>; /** * @param {BrowsingContextPrintParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {boolean} [params.background] * @param {BrowsingContextPrintMarginParameters} [params.margin] * @param {BrowsingContextPrintParametersOrientation} [params.orientation] * @param {BrowsingContextPrintPageParameters} [params.page] * @param {Array<JsUint | string>} [params.pageRanges] * @param {number} [params.scale] * @param {boolean} [params.shrinkToFit] * @returns {Promise<BrowsingContextPrintResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-print */ print(params: BrowsingContextPrintParameters): Promise<BrowsingContextPrintResult>; /** * @param {BrowsingContextReloadParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {boolean} [params.ignoreCache] * @param {BrowsingContextReadinessState} [params.wait] * @returns {Promise<BrowsingContextReloadResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-reload */ reload(params: BrowsingContextReloadParameters): Promise<BrowsingContextReloadResult>; /** * @param {BrowsingContextSetBypassCspParameters} params * @param {true | null} params.bypass * @param {Array<BrowsingContextBrowsingContext>} [params.contexts] * @param {Array<BrowserUserContext>} [params.userContexts] * @returns {Promise<void>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-setBypassCSP */ setBypassCSP(params: BrowsingContextSetBypassCspParameters): Promise<void>; /** * @param {BrowsingContextSetViewportParameters} params * @param {BrowsingContextBrowsingContext} [params.context] * @param {BrowsingContextViewport | null} [params.viewport] * @param {number | null} [params.devicePixelRatio] * @param {Array<BrowserUserContext>} [params.userContexts] * @returns {Promise<void>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-setViewport */ setViewport(params: BrowsingContextSetViewportParameters): Promise<void>; /** * @param {BrowsingContextStartScreencastParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {string} [params.destinationFolder] * @param {string} [params.mimeType] * @param {BrowsingContextMediaTrackConstraints} [params.video] * @param {boolean} [params.audio] * @returns {Promise<BrowsingContextStartScreencastResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-startScreencast */ startScreencast(params: BrowsingContextStartScreencastParameters): Promise<BrowsingContextStartScreencastResult>; /** * @param {BrowsingContextStopScreencastParameters} params * @param {BrowsingContextScreencast} params.screencast * @returns {Promise<BrowsingContextStopScreencastResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-stopScreencast */ stopScreencast(params: BrowsingContextStopScreencastParameters): Promise<BrowsingContextStopScreencastResult>; /** * @param {BrowsingContextTraverseHistoryParameters} params * @param {BrowsingContextBrowsingContext} params.context * @param {JsInt} params.delta * @returns {Promise<void>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-traverseHistory */ traverseHistory(params: BrowsingContextTraverseHistoryParameters): Promise<void>; } /** * moz: vendor variant of BrowsingContext, with browser-specific commands and params. * Construct with MozBrowsingContext.create(driver) for a matching session; other sessions use BrowsingContext. * * This is an unsupported API. No compatibility guarantees are provided. * It tracks the W3C WebDriver BiDi specification directly. As the specification * evolves, this API will change or be removed without prior notice. */ export declare class MozBrowsingContext extends BrowsingContext { static create(driver: unknown): Promise<MozBrowsingContext>; /** * @param {BrowsingContextMozGetTreeParameters} params * @param {JsUint} [params.maxDepth] * @param {BrowsingContextBrowsingContext} [params.root] * @param {"chrome" | "content"} [params.scope] * @returns {Promise<BrowsingContextGetTreeResult>} * @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-getTree */ getTree(params: BrowsingContextMozGetTreeParameters): Promise<BrowsingContextGetTreeResult>; }