Skip to main content

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: Wed Nov 04 2026 11:43:49 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โ€‹

await browser.send(params)

Parametersโ€‹

NameTypeDetailsparamsCommandDatasocket payload

Returnsโ€‹


sendAsyncโ€‹

Send asynchronous socket commands via WebDriver Bidi

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

Usageโ€‹

await browser.sendAsync(params)

Parametersโ€‹

NameTypeDetailsparamsCommandDatasocket payload

Returnsโ€‹


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โ€‹

await browser.sessionStatus(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmptyParams
{}

Returnsโ€‹


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โ€‹

await browser.sessionNew(params)

Parametersโ€‹

NameTypeDetailsparamsremote.SessionNewParameters
{
capabilities: SessionCapabilitiesRequest;
}

Returnsโ€‹


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โ€‹

await browser.sessionEnd(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmptyParams
{}

Returnsโ€‹


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โ€‹

await browser.sessionSubscribe(params)

Parametersโ€‹

NameTypeDetailsparamsremote.SessionSubscribeParameters
{
events: string[];
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.sessionUnsubscribe(params)

Parametersโ€‹

NameTypeDetailsparamsremote.SessionUnsubscribeParameters
{}

Returnsโ€‹


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โ€‹

await browser.browserClose(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmptyParams
{}

Returnsโ€‹


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โ€‹

await browser.browserCreateUserContext(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowserCreateUserContextParameters
{
acceptInsecureCerts?: boolean;
proxy?: SessionProxyConfiguration;
unhandledPromptBehavior?: SessionUserPromptHandler;
}

Returnsโ€‹


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โ€‹

await browser.browserGetClientWindows(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmptyParams
{}

Returnsโ€‹


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โ€‹

await browser.browserGetUserContexts(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmptyParams
{}

Returnsโ€‹


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โ€‹

await browser.browserRemoveUserContext(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowserRemoveUserContextParameters
{
userContext: BrowserUserContext;
}

Returnsโ€‹


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โ€‹

await browser.browserSetClientWindowState(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowserSetClientWindowStateParameters
{
clientWindow: BrowserClientWindow;
};

Returnsโ€‹


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โ€‹

await browser.browserSetDownloadBehavior(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowserSetDownloadBehaviorParameters
{
downloadBehavior: BrowserDownloadBehavior | null;
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.browsingContextActivate(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextActivateParameters
{
context: BrowsingContextBrowsingContext;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextCaptureScreenshot(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextCaptureScreenshotParameters
{
context: BrowsingContextBrowsingContext;
/**
* @default 'viewport'
*/
origin?: "viewport" | "document";
format?: BrowsingContextImageFormat;
clip?: BrowsingContextClipRectangle;
imageSize?: BrowsingContextImageSize;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextClose(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextCloseParameters
{
context: BrowsingContextBrowsingContext;
promptUnload?: boolean;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextCreate(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextCreateParameters
{
type: BrowsingContextCreateType;
referenceContext?: BrowsingContextBrowsingContext;
background?: boolean;
userContext?: BrowserUserContext;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextGetTree(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextGetTreeParameters
{
maxDepth?: JsUint;
root?: BrowsingContextBrowsingContext;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextHandleUserPrompt(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextHandleUserPromptParameters
{
context: BrowsingContextBrowsingContext;
accept?: boolean;
userText?: string;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextLocateNodes(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextLocateNodesParameters
{
context: BrowsingContextBrowsingContext;
locator: BrowsingContextLocator;
maxNodeCount?: JsUint;
serializationOptions?: ScriptSerializationOptions;
startNodes?: ScriptSharedReference[];
}

Returnsโ€‹


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โ€‹

await browser.browsingContextNavigate(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextNavigateParameters
{
context: BrowsingContextBrowsingContext;
url: string;
wait?: BrowsingContextReadinessState;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextPrint(params)

Parametersโ€‹

NameTypeDetailsparamsremote.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โ€‹


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โ€‹

await browser.browsingContextReload(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextReloadParameters
{
context: BrowsingContextBrowsingContext;
ignoreCache?: boolean;
wait?: BrowsingContextReadinessState;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextSetBypassCsp(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextSetBypassCspParameters
{
bypass: true | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.browsingContextSetViewport(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextSetViewportParameters
{
context?: BrowsingContextBrowsingContext;
viewport?: BrowsingContextViewport | null;
devicePixelRatio?: number | null;
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.browsingContextStartScreencast(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextStartScreencastParameters
{
context: BrowsingContextBrowsingContext;
destinationFolder?: string;
mimeType?: string;
video?: BrowsingContextMediaTrackConstraints;
audio?: boolean;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextStopScreencast(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextStopScreencastParameters
{
screencast: BrowsingContextScreencast;
}

Returnsโ€‹


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โ€‹

await browser.browsingContextTraverseHistory(params)

Parametersโ€‹

NameTypeDetailsparamsremote.BrowsingContextTraverseHistoryParameters
{
context: BrowsingContextBrowsingContext;
delta: JsInt;
}

Returnsโ€‹


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โ€‹

await browser.emulationSetForcedColorsModeThemeOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetForcedColorsModeThemeOverrideParameters
{
theme: EmulationForcedColorsModeTheme | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetGeolocationOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetGeolocationOverrideParameters
{
coordinates: EmulationGeolocationCoordinates | null;
} | {
error: EmulationGeolocationPositionError;
}) & {
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
};

Returnsโ€‹


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โ€‹

await browser.emulationSetLocaleOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetLocaleOverrideParameters
{
locale: string | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


emulationSetMediaFeaturesOverrideโ€‹

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

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

Usageโ€‹

await browser.emulationSetMediaFeaturesOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetMediaFeaturesOverrideParameters
{
features: EmulationMediaFeatures | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetNetworkConditions(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetNetworkConditionsParameters
{
networkConditions: EmulationNetworkConditions | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetScreenSettingsOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetScreenSettingsOverrideParameters
{
screenArea: EmulationScreenArea | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetScreenOrientationOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetScreenOrientationOverrideParameters
{
screenOrientation: EmulationScreenOrientation | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetUserAgentOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetUserAgentOverrideParameters
{
userAgent: string | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


emulationSetViewportMetaOverrideโ€‹

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

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

Usageโ€‹

await browser.emulationSetViewportMetaOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetViewportMetaOverrideParameters
{
viewportMeta: true | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetScriptingEnabled(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetScriptingEnabledParameters
{
enabled: false | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetScrollbarTypeOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetScrollbarTypeOverrideParameters
{
scrollbarType: "classic" | "overlay" | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


emulationSetTextLayoutModeOverrideโ€‹

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

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

Usageโ€‹

await browser.emulationSetTextLayoutModeOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetTextLayoutModeOverrideParameters
{
textLayoutMode: EmulationTextLayoutMode | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetTimezoneOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetTimezoneOverrideParameters
{
timezone: string | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.emulationSetTouchOverride(params)

Parametersโ€‹

NameTypeDetailsparamsremote.EmulationSetTouchOverrideParameters
{
maxTouchPoints: JsUint | null;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.networkAddDataCollector(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkAddDataCollectorParameters
{
dataTypes: NetworkDataType[];
maxEncodedDataSize: JsUint;
/**
* @default 'blob'
*/
collectorType?: NetworkCollectorType;
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.networkAddIntercept(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkAddInterceptParameters
{
phases: NetworkInterceptPhase[];
contexts?: BrowsingContextBrowsingContext[];
urlPatterns?: NetworkUrlPattern[];
}

Returnsโ€‹


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โ€‹

await browser.networkContinueRequest(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkContinueRequestParameters
{
request: NetworkRequest;
body?: NetworkBytesValue;
cookies?: NetworkCookieHeader[];
headers?: NetworkHeader[];
method?: string;
url?: string;
}

Returnsโ€‹


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โ€‹

await browser.networkContinueResponse(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkContinueResponseParameters
{
request: NetworkRequest;
cookies?: NetworkSetCookieHeader[];
credentials?: NetworkAuthCredentials;
headers?: NetworkHeader[];
reasonPhrase?: string;
statusCode?: JsUint;
}

Returnsโ€‹


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โ€‹

await browser.networkContinueWithAuth(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkContinueWithAuthParameters
{
request: NetworkRequest;
};

Returnsโ€‹


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โ€‹

await browser.networkDisownData(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkDisownDataParameters
{
dataType: NetworkDataType;
collector: NetworkCollector;
request: NetworkRequest;
}

Returnsโ€‹


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โ€‹

await browser.networkFailRequest(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkFailRequestParameters
{
request: NetworkRequest;
}

Returnsโ€‹


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โ€‹

await browser.networkGetData(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkGetDataParameters
{
dataType: NetworkDataType;
collector?: NetworkCollector;
disown?: boolean;
request: NetworkRequest;
}

Returnsโ€‹


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โ€‹

await browser.networkProvideResponse(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkProvideResponseParameters
{
request: NetworkRequest;
body?: NetworkBytesValue;
cookies?: NetworkSetCookieHeader[];
headers?: NetworkHeader[];
reasonPhrase?: string;
statusCode?: JsUint;
}

Returnsโ€‹


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โ€‹

await browser.networkRemoveDataCollector(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkRemoveDataCollectorParameters
{
collector: NetworkCollector;
}

Returnsโ€‹


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โ€‹

await browser.networkRemoveIntercept(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkRemoveInterceptParameters
{
intercept: NetworkIntercept;
}

Returnsโ€‹


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โ€‹

await browser.networkSetCacheBehavior(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkSetCacheBehaviorParameters
{
cacheBehavior: "default" | "bypass";
contexts?: BrowsingContextBrowsingContext[];
}

Returnsโ€‹


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โ€‹

await browser.networkSetExtraHeaders(params)

Parametersโ€‹

NameTypeDetailsparamsremote.NetworkSetExtraHeadersParameters
{
headers: NetworkHeader[];
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
}

Returnsโ€‹


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โ€‹

await browser.scriptAddPreloadScript(params)

Parametersโ€‹

NameTypeDetailsparamsremote.ScriptAddPreloadScriptParameters
{
functionDeclaration: string;
arguments?: ScriptChannelValue[];
contexts?: BrowsingContextBrowsingContext[];
userContexts?: BrowserUserContext[];
sandbox?: string;
}

Returnsโ€‹


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โ€‹

await browser.scriptDisown(params)

Parametersโ€‹

NameTypeDetailsparamsremote.ScriptDisownParameters
{
handles: ScriptHandle[];
target: ScriptTarget;
}

Returnsโ€‹


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โ€‹

await browser.scriptCallFunction(params)

Parametersโ€‹

NameTypeDetailsparamsremote.ScriptCallFunctionParameters
{
functionDeclaration: string;
awaitPromise: boolean;
target: ScriptTarget;
arguments?: ScriptLocalValue[];
resultOwnership?: ScriptResultOwnership;
serializationOptions?: ScriptSerializationOptions;
this?: ScriptLocalValue;
userActivation?: boolean;
}

Returnsโ€‹


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โ€‹

await browser.scriptEvaluate(params)

Parametersโ€‹

NameTypeDetailsparamsremote.ScriptEvaluateParameters
{
expression: string;
target: ScriptTarget;
awaitPromise: boolean;
resultOwnership?: ScriptResultOwnership;
serializationOptions?: ScriptSerializationOptions;
userActivation?: boolean;
}

Returnsโ€‹


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โ€‹

await browser.scriptGetRealms(params)

Parametersโ€‹

NameTypeDetailsparamsremote.ScriptGetRealmsParameters
{
context?: BrowsingContextBrowsingContext;
type?: ScriptRealmType;
}

Returnsโ€‹


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โ€‹

await browser.scriptRemovePreloadScript(params)

Parametersโ€‹

NameTypeDetailsparamsremote.ScriptRemovePreloadScriptParameters
{
script: ScriptPreloadScript;
}

Returnsโ€‹


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โ€‹

await browser.storageGetCookies(params)

Parametersโ€‹

NameTypeDetailsparamsremote.StorageGetCookiesParameters
{
filter?: StorageCookieFilter;
partition?: StoragePartitionDescriptor;
}

Returnsโ€‹


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โ€‹

await browser.storageSetCookie(params)

Parametersโ€‹

NameTypeDetailsparamsremote.StorageSetCookieParameters
{
cookie: StoragePartialCookie;
partition?: StoragePartitionDescriptor;
}

Returnsโ€‹


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โ€‹

await browser.storageDeleteCookies(params)

Parametersโ€‹

NameTypeDetailsparamsremote.StorageDeleteCookiesParameters
{
filter?: StorageCookieFilter;
partition?: StoragePartitionDescriptor;
}

Returnsโ€‹


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โ€‹

await browser.inputPerformActions(params)

Parametersโ€‹

NameTypeDetailsparamsremote.InputPerformActionsParameters
{
context: BrowsingContextBrowsingContext;
actions: InputSourceActions[];
}

Returnsโ€‹


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โ€‹

await browser.inputReleaseActions(params)

Parametersโ€‹

NameTypeDetailsparamsremote.InputReleaseActionsParameters
{
context: BrowsingContextBrowsingContext;
}

Returnsโ€‹


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โ€‹

await browser.inputSetFiles(params)

Parametersโ€‹

NameTypeDetailsparamsremote.InputSetFilesParameters
{
context: BrowsingContextBrowsingContext;
element: ScriptSharedReference;
files: string[];
}

Returnsโ€‹


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โ€‹

await browser.webExtensionInstall(params)

Parametersโ€‹

NameTypeDetailsparamsremote.WebExtensionInstallParameters
{
extensionData: WebExtensionExtensionData;
}

Returnsโ€‹


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โ€‹

await browser.webExtensionUninstall(params)

Parametersโ€‹

NameTypeDetailsparamsremote.WebExtensionUninstallParameters
{
extension: WebExtensionExtension;
}

Returnsโ€‹

Welcome! How can I help?

WebdriverIO AI Copilot