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.
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: Thu Sep 25 2025 07:17:16 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โ
| Name | Type | Details |
|---|---|---|
params | CommandData | socket 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โ
| Name | Type | Details |
|---|---|---|
params | CommandData | socket 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โ
| Name | Type | Details |
|---|---|---|
params | remote.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โ
| Name | Type | Details |
|---|---|---|
params | remote.SessionNewParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.EmptyParams | {} |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.SessionSubscriptionRequest | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.SessionUnsubscribeParameters | \} |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.EmptyParams | {} |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowserCreateUserContextParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.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โ
| Name | Type | Details |
|---|---|---|
params | remote.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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowserRemoveUserContextParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowserSetClientWindowStateParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextActivateParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextCaptureScreenshotParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextCloseParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextCreateParameters | { |
Returnsโ
- <Object>
local.BrowsingContextCreateResult: Command return value with the following interface:{
context: BrowsingContextBrowsingContext;
}
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextGetTreeParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextHandleUserPromptParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextLocateNodesParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextNavigateParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextPrintParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextReloadParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextSetViewportParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.BrowsingContextTraverseHistoryParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.EmulationSetGeolocationOverrideParameters | \} |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkAddInterceptParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkContinueRequestParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkContinueResponseParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkContinueWithAuthParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkFailRequestParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkProvideResponseParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkRemoveInterceptParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.NetworkSetCacheBehaviorParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.ScriptAddPreloadScriptParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.ScriptDisownParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.ScriptCallFunctionParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.ScriptEvaluateParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.ScriptGetRealmsParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.ScriptRemovePreloadScriptParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.StorageGetCookiesParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.StorageSetCookieParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.StorageDeleteCookiesParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.InputPerformActionsParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.InputReleaseActionsParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.InputSetFilesParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.WebExtensionInstallParameters | { |
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โ
| Name | Type | Details |
|---|---|---|
params | remote.WebExtensionUninstallParameters | { |