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: Wed Sep 25 2024 15:34:06 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;
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 | { |
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.SessionSubscriptionRequest | { |
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.EmptyParams | {} |
Returns
- <Object>
local.BrowserCreateUserContextResult
: Command return value with the following interface:;
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 | { |
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 | { |
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 | { |
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 | { |