Chuyển đến nội dung chính

WebDriver Bidi Protocol

These protocol commands are generated based on the current living WebDriver Bidi specification. To enable the protocol for your test make sure to have webSocketUrl: true set in your capabilities.

Use with Caution!

Browser support is not guaranteed and interfaces can change in the future. The standard is currently under development and browser vendors will add these capabilities based on their own timelines.

Last Updated: Fri Jun 12 2026 18:22:30 GMT+0000 (Coordinated Universal Time)


send

Send socket commands via WebDriver Bidi

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.send(params)
Parameters
NameTypeDetails
paramsCommandDatasocket payload
Returns
  • <Object> CommandResponse: WebDriver Bidi response

sendAsync

Send asynchronous socket commands via WebDriver Bidi

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.sendAsync(params)
Parameters
NameTypeDetails
paramsCommandDatasocket payload
Returns
  • <Number> id: id of WebDriver Bidi request

sessionStatus

WebDriver Bidi command to send command method "session.status" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.sessionStatus(params)
Parameters
NameTypeDetails
paramsremote.EmptyParams
{}
Returns
  • <Object> local.SessionStatusResult: Command return value with the following interface:
    {
    ready: boolean;
    message: string;
    }

sessionNew

WebDriver Bidi command to send command method "session.new" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.sessionNew(params)
Parameters
NameTypeDetails
paramsremote.SessionNewParameters
{
capabilities: SessionCapabilitiesRequest;
}
Returns
  • <Object> local.SessionNewResult: Command return value with the following interface:
    {
    sessionId: string;
    capabilities: {
    acceptInsecureCerts: boolean;
    browserName: string;
    browserVersion: string;
    platformName: string;
    setWindowRect: boolean;
    userAgent: string;
    proxy?: SessionProxyConfiguration;
    unhandledPromptBehavior?: SessionUserPromptHandler;
    webSocketUrl?: string;
    };
    }

sessionEnd

WebDriver Bidi command to send command method "session.end" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.sessionEnd(params)
Parameters
NameTypeDetails
paramsremote.EmptyParams
{}
Returns
  • <Object> local.SessionEndResult: Command return value with the following interface:
    ;

sessionSubscribe

WebDriver Bidi command to send command method "session.subscribe" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.sessionSubscribe(params)
Parameters
NameTypeDetails
paramsremote.SessionSubscribeParameters
{
events: string[];
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.SessionSubscribeResult: Command return value with the following interface:
    {
    subscription: SessionSubscription;
    }

sessionUnsubscribe

WebDriver Bidi command to send command method "session.unsubscribe" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.sessionUnsubscribe(params)
Parameters
NameTypeDetails
paramsremote.SessionUnsubscribeParameters
{}
Returns
  • <Object> local.SessionUnsubscribeResult: Command return value with the following interface:
    ;

browserClose

WebDriver Bidi command to send command method "browser.close" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserClose(params)
Parameters
NameTypeDetails
paramsremote.EmptyParams
{}
Returns
  • <Object> local.BrowserCloseResult: Command return value with the following interface:
    ;

browserCreateUserContext

WebDriver Bidi command to send command method "browser.createUserContext" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserCreateUserContext(params)
Parameters
NameTypeDetails
paramsremote.BrowserCreateUserContextParameters
{
acceptInsecureCerts?: boolean;
proxy?: SessionProxyConfiguration;
unhandledPromptBehavior?: SessionUserPromptHandler;
}
Returns
  • <Object> local.BrowserCreateUserContextResult: Command return value with the following interface:
    ;

browserGetClientWindows

WebDriver Bidi command to send command method "browser.getClientWindows" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserGetClientWindows(params)
Parameters
NameTypeDetails
paramsremote.EmptyParams
{}
Returns
  • <Object> local.BrowserGetClientWindowsResult: Command return value with the following interface:
    {
    clientWindows: BrowserClientWindowInfo[];
    }

browserGetUserContexts

WebDriver Bidi command to send command method "browser.getUserContexts" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserGetUserContexts(params)
Parameters
NameTypeDetails
paramsremote.EmptyParams
{}
Returns
  • <Object> local.BrowserGetUserContextsResult: Command return value with the following interface:
    {
    userContexts: BrowserUserContextInfo[];
    }

browserRemoveUserContext

WebDriver Bidi command to send command method "browser.removeUserContext" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserRemoveUserContext(params)
Parameters
NameTypeDetails
paramsremote.BrowserRemoveUserContextParameters
{
userContext: BrowserUserContext;
}
Returns
  • <Object> local.BrowserRemoveUserContextResult: Command return value with the following interface:
    ;

browserSetClientWindowState

WebDriver Bidi command to send command method "browser.setClientWindowState" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserSetClientWindowState(params)
Parameters
NameTypeDetails
paramsremote.BrowserSetClientWindowStateParameters
{
clientWindow: BrowserClientWindow;
};
Returns
  • <Object> local.BrowserSetClientWindowStateResult: Command return value with the following interface:
    ;

browserSetDownloadBehavior

WebDriver Bidi command to send command method "browser.setDownloadBehavior" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browserSetDownloadBehavior(params)
Parameters
NameTypeDetails
paramsremote.BrowserSetDownloadBehaviorParameters
{
downloadBehavior: BrowserDownloadBehavior | null;
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.BrowserSetDownloadBehaviorResult: Command return value with the following interface:
    ;

browsingContextActivate

WebDriver Bidi command to send command method "browsingContext.activate" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextActivate(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextActivateParameters
{
context: BrowsingContextBrowsingContext;
}
Returns
  • <Object> local.BrowsingContextActivateResult: Command return value with the following interface:
    ;

browsingContextCaptureScreenshot

WebDriver Bidi command to send command method "browsingContext.captureScreenshot" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextCaptureScreenshot(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextCaptureScreenshotParameters
{
context: BrowsingContextBrowsingContext;
/**
* @default 'viewport'
*/
origin?: "viewport" | "document";
format?: BrowsingContextImageFormat;
clip?: BrowsingContextClipRectangle;
}
Returns
  • <Object> local.BrowsingContextCaptureScreenshotResult: Command return value with the following interface:
    {
    data: string;
    }

browsingContextClose

WebDriver Bidi command to send command method "browsingContext.close" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextClose(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextCloseParameters
{
context: BrowsingContextBrowsingContext;
promptUnload?: boolean;
}
Returns
  • <Object> local.BrowsingContextCloseResult: Command return value with the following interface:
    ;

browsingContextCreate

WebDriver Bidi command to send command method "browsingContext.create" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextCreate(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextCreateParameters
{
type: BrowsingContextCreateType;
referenceContext?: BrowsingContextBrowsingContext;
background?: boolean;
userContext?: BrowserUserContext;
}
Returns
  • <Object> local.BrowsingContextCreateResult: Command return value with the following interface:
    {
    context: BrowsingContextBrowsingContext;
    userContext?: BrowserUserContext;
    }

browsingContextGetTree

WebDriver Bidi command to send command method "browsingContext.getTree" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextGetTree(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextGetTreeParameters
{
maxDepth?: JsUint;
root?: BrowsingContextBrowsingContext;
}
Returns
  • <Object> local.BrowsingContextGetTreeResult: Command return value with the following interface:
    {
    contexts: BrowsingContextInfoList;
    }

browsingContextHandleUserPrompt

WebDriver Bidi command to send command method "browsingContext.handleUserPrompt" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextHandleUserPrompt(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextHandleUserPromptParameters
{
context: BrowsingContextBrowsingContext;
accept?: boolean;
userText?: string;
}
Returns
  • <Object> local.BrowsingContextHandleUserPromptResult: Command return value with the following interface:
    ;

browsingContextLocateNodes

WebDriver Bidi command to send command method "browsingContext.locateNodes" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextLocateNodes(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextLocateNodesParameters
{
context: BrowsingContextBrowsingContext;
locator: BrowsingContextLocator;
maxNodeCount?: JsUint;
serializationOptions?: ScriptSerializationOptions;
startNodes?: ScriptSharedReference[];
}
Returns
  • <Object> local.BrowsingContextLocateNodesResult: Command return value with the following interface:
    {
    nodes: ScriptNodeRemoteValue[];
    }

browsingContextNavigate

WebDriver Bidi command to send command method "browsingContext.navigate" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextNavigate(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextNavigateParameters
{
context: BrowsingContextBrowsingContext;
url: string;
wait?: BrowsingContextReadinessState;
}
Returns
  • <Object> local.BrowsingContextNavigateResult: Command return value with the following interface:
    {
    navigation: BrowsingContextNavigation | null;
    url: string;
    }

browsingContextPrint

WebDriver Bidi command to send command method "browsingContext.print" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextPrint(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextPrintParameters
{
context: BrowsingContextBrowsingContext;
background?: boolean;
margin?: BrowsingContextPrintMarginParameters;
/**
* @default 'portrait'
*/
orientation?: "portrait" | "landscape";
page?: BrowsingContextPrintPageParameters;
pageRanges?: (JsUint | string)[];
/**
* @default 1
*/
scale?: number;
/**
* @default true
*/
shrinkToFit?: boolean;
}
Returns
  • <Object> local.BrowsingContextPrintResult: Command return value with the following interface:
    {
    data: string;
    }

browsingContextReload

WebDriver Bidi command to send command method "browsingContext.reload" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextReload(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextReloadParameters
{
context: BrowsingContextBrowsingContext;
ignoreCache?: boolean;
wait?: BrowsingContextReadinessState;
}
Returns
  • <Object> local.BrowsingContextReloadResult: Command return value with the following interface:
    ;

browsingContextSetBypassCsp

WebDriver Bidi command to send command method "browsingContext.setBypassCSP" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextSetBypassCsp(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextSetBypassCspParameters
{
bypass: true | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.BrowsingContextSetBypassCspResult: Command return value with the following interface:
    ;

browsingContextSetViewport

WebDriver Bidi command to send command method "browsingContext.setViewport" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextSetViewport(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextSetViewportParameters
{
context?: BrowsingContextBrowsingContext;
viewport?: BrowsingContextViewport | null;
devicePixelRatio?: number | null;
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.BrowsingContextSetViewportResult: Command return value with the following interface:
    ;

browsingContextStartScreencast

WebDriver Bidi command to send command method "browsingContext.startScreencast" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextStartScreencast(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextStartScreencastParameters
{
context: BrowsingContextBrowsingContext;
mimeType?: string;
video?: BrowsingContextMediaTrackConstraints;
audio?: boolean;
}
Returns
  • <Object> local.BrowsingContextStartScreencastResult: Command return value with the following interface:
    {
    screencast: BrowsingContextScreencast;
    path: string;
    }

browsingContextStopScreencast

WebDriver Bidi command to send command method "browsingContext.stopScreencast" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextStopScreencast(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextStopScreencastParameters
{
screencast: BrowsingContextScreencast;
}
Returns
  • <Object> local.BrowsingContextStopScreencastResult: Command return value with the following interface:
    {
    path: string;
    error?: string;
    }

browsingContextTraverseHistory

WebDriver Bidi command to send command method "browsingContext.traverseHistory" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.browsingContextTraverseHistory(params)
Parameters
NameTypeDetails
paramsremote.BrowsingContextTraverseHistoryParameters
{
context: BrowsingContextBrowsingContext;
delta: JsInt;
}
Returns
  • <Object> local.BrowsingContextTraverseHistoryResult: Command return value with the following interface:
    ;

emulationSetForcedColorsModeThemeOverride

WebDriver Bidi command to send command method "emulation.setForcedColorsModeThemeOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetForcedColorsModeThemeOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetForcedColorsModeThemeOverrideParameters
{
theme: EmulationForcedColorsModeTheme | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetForcedColorsModeThemeOverrideResult: Command return value with the following interface:
    ;

emulationSetGeolocationOverride

WebDriver Bidi command to send command method "emulation.setGeolocationOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetGeolocationOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetGeolocationOverrideParameters
{
coordinates: EmulationGeolocationCoordinates | null;
} | {
error: EmulationGeolocationPositionError;
}) & {
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
};
Returns
  • <Object> local.EmulationSetGeolocationOverrideResult: Command return value with the following interface:
    ;

emulationSetLocaleOverride

WebDriver Bidi command to send command method "emulation.setLocaleOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetLocaleOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetLocaleOverrideParameters
{
locale: string | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetLocaleOverrideResult: Command return value with the following interface:
    ;

emulationSetNetworkConditions

WebDriver Bidi command to send command method "emulation.setNetworkConditions" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetNetworkConditions(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetNetworkConditionsParameters
{
networkConditions: EmulationNetworkConditions | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetNetworkConditionsResult: Command return value with the following interface:
    ;

emulationSetScreenSettingsOverride

WebDriver Bidi command to send command method "emulation.setScreenSettingsOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetScreenSettingsOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetScreenSettingsOverrideParameters
{
screenArea: EmulationScreenArea | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetScreenSettingsOverrideResult: Command return value with the following interface:
    ;

emulationSetScreenOrientationOverride

WebDriver Bidi command to send command method "emulation.setScreenOrientationOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetScreenOrientationOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetScreenOrientationOverrideParameters
{
screenOrientation: EmulationScreenOrientation | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetScreenOrientationOverrideResult: Command return value with the following interface:
    ;

emulationSetUserAgentOverride

WebDriver Bidi command to send command method "emulation.setUserAgentOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetUserAgentOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetUserAgentOverrideParameters
{
userAgent: string | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetUserAgentOverrideResult: Command return value with the following interface:
    ;

emulationSetScriptingEnabled

WebDriver Bidi command to send command method "emulation.setScriptingEnabled" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetScriptingEnabled(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetScriptingEnabledParameters
{
enabled: false | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetScriptingEnabledResult: Command return value with the following interface:
    ;

emulationSetScrollbarTypeOverride

WebDriver Bidi command to send command method "emulation.setScrollbarTypeOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetScrollbarTypeOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetScrollbarTypeOverrideParameters
{
scrollbarType: "classic" | "overlay" | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetScrollbarTypeOverrideResult: Command return value with the following interface:
    ;

emulationSetTimezoneOverride

WebDriver Bidi command to send command method "emulation.setTimezoneOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetTimezoneOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetTimezoneOverrideParameters
{
timezone: string | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetTimezoneOverrideResult: Command return value with the following interface:
    ;

emulationSetTouchOverride

WebDriver Bidi command to send command method "emulation.setTouchOverride" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.emulationSetTouchOverride(params)
Parameters
NameTypeDetails
paramsremote.EmulationSetTouchOverrideParameters
{
maxTouchPoints: JsUint | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.EmulationSetTouchOverrideResult: Command return value with the following interface:
    ;

networkAddDataCollector

WebDriver Bidi command to send command method "network.addDataCollector" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkAddDataCollector(params)
Parameters
NameTypeDetails
paramsremote.NetworkAddDataCollectorParameters
{
dataTypes: NetworkDataType[];
maxEncodedDataSize: JsUint;
/**
* @default 'blob'
*/
collectorType?: NetworkCollectorType;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.NetworkAddDataCollectorResult: Command return value with the following interface:
    {
    collector: NetworkCollector;
    }

networkAddIntercept

WebDriver Bidi command to send command method "network.addIntercept" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkAddIntercept(params)
Parameters
NameTypeDetails
paramsremote.NetworkAddInterceptParameters
{
phases: NetworkInterceptPhase[];
contexts?: BrowsingContextBrowsingContext[];
urlPatterns?: NetworkUrlPattern[];
}
Returns
  • <Object> local.NetworkAddInterceptResult: Command return value with the following interface:
    {
    intercept: NetworkIntercept;
    }

networkContinueRequest

WebDriver Bidi command to send command method "network.continueRequest" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkContinueRequest(params)
Parameters
NameTypeDetails
paramsremote.NetworkContinueRequestParameters
{
request: NetworkRequest;
body?: NetworkBytesValue;
cookies?: NetworkCookieHeader[];
headers?: NetworkHeader[];
method?: string;
url?: string;
}
Returns
  • <Object> local.NetworkContinueRequestResult: Command return value with the following interface:
    ;

networkContinueResponse

WebDriver Bidi command to send command method "network.continueResponse" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkContinueResponse(params)
Parameters
NameTypeDetails
paramsremote.NetworkContinueResponseParameters
{
request: NetworkRequest;
cookies?: NetworkSetCookieHeader[];
credentials?: NetworkAuthCredentials;
headers?: NetworkHeader[];
reasonPhrase?: string;
statusCode?: JsUint;
}
Returns
  • <Object> local.NetworkContinueResponseResult: Command return value with the following interface:
    ;

networkContinueWithAuth

WebDriver Bidi command to send command method "network.continueWithAuth" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkContinueWithAuth(params)
Parameters
NameTypeDetails
paramsremote.NetworkContinueWithAuthParameters
{
request: NetworkRequest;
};
Returns
  • <Object> local.NetworkContinueWithAuthResult: Command return value with the following interface:
    ;

networkDisownData

WebDriver Bidi command to send command method "network.disownData" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkDisownData(params)
Parameters
NameTypeDetails
paramsremote.NetworkDisownDataParameters
{
dataType: NetworkDataType;
collector: NetworkCollector;
request: NetworkRequest;
}
Returns
  • <Object> local.NetworkDisownDataResult: Command return value with the following interface:
    ;

networkFailRequest

WebDriver Bidi command to send command method "network.failRequest" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkFailRequest(params)
Parameters
NameTypeDetails
paramsremote.NetworkFailRequestParameters
{
request: NetworkRequest;
}
Returns
  • <Object> local.NetworkFailRequestResult: Command return value with the following interface:
    ;

networkGetData

WebDriver Bidi command to send command method "network.getData" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkGetData(params)
Parameters
NameTypeDetails
paramsremote.NetworkGetDataParameters
{
dataType: NetworkDataType;
collector?: NetworkCollector;
disown?: boolean;
request: NetworkRequest;
}
Returns
  • <Object> local.NetworkGetDataResult: Command return value with the following interface:
    {
    bytes: NetworkBytesValue;
    }

networkProvideResponse

WebDriver Bidi command to send command method "network.provideResponse" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkProvideResponse(params)
Parameters
NameTypeDetails
paramsremote.NetworkProvideResponseParameters
{
request: NetworkRequest;
body?: NetworkBytesValue;
cookies?: NetworkSetCookieHeader[];
headers?: NetworkHeader[];
reasonPhrase?: string;
statusCode?: JsUint;
}
Returns
  • <Object> local.NetworkProvideResponseResult: Command return value with the following interface:
    ;

networkRemoveDataCollector

WebDriver Bidi command to send command method "network.removeDataCollector" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkRemoveDataCollector(params)
Parameters
NameTypeDetails
paramsremote.NetworkRemoveDataCollectorParameters
{
collector: NetworkCollector;
}
Returns
  • <Object> local.NetworkRemoveDataCollectorResult: Command return value with the following interface:
    ;

networkRemoveIntercept

WebDriver Bidi command to send command method "network.removeIntercept" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkRemoveIntercept(params)
Parameters
NameTypeDetails
paramsremote.NetworkRemoveInterceptParameters
{
intercept: NetworkIntercept;
}
Returns
  • <Object> local.NetworkRemoveInterceptResult: Command return value with the following interface:
    ;

networkSetCacheBehavior

WebDriver Bidi command to send command method "network.setCacheBehavior" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkSetCacheBehavior(params)
Parameters
NameTypeDetails
paramsremote.NetworkSetCacheBehaviorParameters
{
cacheBehavior: "default" | "bypass";
contexts?: BrowsingContextBrowsingContext[];
}
Returns
  • <Object> local.NetworkSetCacheBehaviorResult: Command return value with the following interface:
    ;

networkSetExtraHeaders

WebDriver Bidi command to send command method "network.setExtraHeaders" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.networkSetExtraHeaders(params)
Parameters
NameTypeDetails
paramsremote.NetworkSetExtraHeadersParameters
{
headers: NetworkHeader[];
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}
Returns
  • <Object> local.NetworkSetExtraHeadersResult: Command return value with the following interface:
    ;

scriptAddPreloadScript

WebDriver Bidi command to send command method "script.addPreloadScript" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.scriptAddPreloadScript(params)
Parameters
NameTypeDetails
paramsremote.ScriptAddPreloadScriptParameters
{
functionDeclaration: string;
arguments?: ScriptChannelValue[];
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
sandbox?: string;
}
Returns
  • <Object> local.ScriptAddPreloadScriptResult: Command return value with the following interface:
    {
    script: ScriptPreloadScript;
    }

scriptDisown

WebDriver Bidi command to send command method "script.disown" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.scriptDisown(params)
Parameters
NameTypeDetails
paramsremote.ScriptDisownParameters
{
handles: ScriptHandle[];
target: ScriptTarget;
}
Returns
  • <Object> local.ScriptDisownResult: Command return value with the following interface:
    ;

scriptCallFunction

WebDriver Bidi command to send command method "script.callFunction" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.scriptCallFunction(params)
Parameters
NameTypeDetails
paramsremote.ScriptCallFunctionParameters
{
functionDeclaration: string;
awaitPromise: boolean;
target: ScriptTarget;
arguments?: ScriptLocalValue[];
resultOwnership?: ScriptResultOwnership;
serializationOptions?: ScriptSerializationOptions;
this?: ScriptLocalValue;
userActivation?: boolean;
}
Returns
  • <Object> local.ScriptCallFunctionResult: Command return value with the following interface:
    ;

scriptEvaluate

WebDriver Bidi command to send command method "script.evaluate" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.scriptEvaluate(params)
Parameters
NameTypeDetails
paramsremote.ScriptEvaluateParameters
{
expression: string;
target: ScriptTarget;
awaitPromise: boolean;
resultOwnership?: ScriptResultOwnership;
serializationOptions?: ScriptSerializationOptions;
userActivation?: boolean;
}
Returns
  • <Object> local.ScriptEvaluateResult: Command return value with the following interface:
    ;

scriptGetRealms

WebDriver Bidi command to send command method "script.getRealms" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.scriptGetRealms(params)
Parameters
NameTypeDetails
paramsremote.ScriptGetRealmsParameters
{
context?: BrowsingContextBrowsingContext;
type?: ScriptRealmType;
}
Returns
  • <Object> local.ScriptGetRealmsResult: Command return value with the following interface:
    {
    realms: ScriptRealmInfo[];
    }

scriptRemovePreloadScript

WebDriver Bidi command to send command method "script.removePreloadScript" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.scriptRemovePreloadScript(params)
Parameters
NameTypeDetails
paramsremote.ScriptRemovePreloadScriptParameters
{
script: ScriptPreloadScript;
}
Returns
  • <Object> local.ScriptRemovePreloadScriptResult: Command return value with the following interface:
    ;

storageGetCookies

WebDriver Bidi command to send command method "storage.getCookies" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.storageGetCookies(params)
Parameters
NameTypeDetails
paramsremote.StorageGetCookiesParameters
{
filter?: StorageCookieFilter;
partition?: StoragePartitionDescriptor;
}
Returns
  • <Object> local.StorageGetCookiesResult: Command return value with the following interface:
    {
    cookies: NetworkCookie[];
    partitionKey: StoragePartitionKey;
    }

storageSetCookie

WebDriver Bidi command to send command method "storage.setCookie" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.storageSetCookie(params)
Parameters
NameTypeDetails
paramsremote.StorageSetCookieParameters
{
cookie: StoragePartialCookie;
partition?: StoragePartitionDescriptor;
}
Returns
  • <Object> local.StorageSetCookieResult: Command return value with the following interface:
    {
    partitionKey: StoragePartitionKey;
    }

storageDeleteCookies

WebDriver Bidi command to send command method "storage.deleteCookies" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.storageDeleteCookies(params)
Parameters
NameTypeDetails
paramsremote.StorageDeleteCookiesParameters
{
filter?: StorageCookieFilter;
partition?: StoragePartitionDescriptor;
}
Returns
  • <Object> local.StorageDeleteCookiesResult: Command return value with the following interface:
    {
    partitionKey: StoragePartitionKey;
    }

inputPerformActions

WebDriver Bidi command to send command method "input.performActions" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.inputPerformActions(params)
Parameters
NameTypeDetails
paramsremote.InputPerformActionsParameters
{
context: BrowsingContextBrowsingContext;
actions: InputSourceActions[];
}
Returns
  • <Object> local.InputPerformActionsResult: Command return value with the following interface:
    ;

inputReleaseActions

WebDriver Bidi command to send command method "input.releaseActions" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.inputReleaseActions(params)
Parameters
NameTypeDetails
paramsremote.InputReleaseActionsParameters
{
context: BrowsingContextBrowsingContext;
}
Returns
  • <Object> local.InputReleaseActionsResult: Command return value with the following interface:
    ;

inputSetFiles

WebDriver Bidi command to send command method "input.setFiles" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.inputSetFiles(params)
Parameters
NameTypeDetails
paramsremote.InputSetFilesParameters
{
context: BrowsingContextBrowsingContext;
element: ScriptSharedReference;
files: string[];
}
Returns
  • <Object> local.InputSetFilesResult: Command return value with the following interface:
    ;

webExtensionInstall

WebDriver Bidi command to send command method "webExtension.install" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.webExtensionInstall(params)
Parameters
NameTypeDetails
paramsremote.WebExtensionInstallParameters
{
extensionData: WebExtensionExtensionData;
}
Returns
  • <Object> local.WebExtensionInstallResult: Command return value with the following interface:
    {
    extension: WebExtensionExtension;
    }

webExtensionUninstall

WebDriver Bidi command to send command method "webExtension.uninstall" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage
browser.webExtensionUninstall(params)
Parameters
NameTypeDetails
paramsremote.WebExtensionUninstallParameters
{
extension: WebExtensionExtension;
}
Returns
  • <Object> local.WebExtensionUninstallResult: Command return value with the following interface:
    ;

Welcome! How can I help?

WebdriverIO AI Copilot