Skip to content

WebDriver BiDi Protocol Reference

All module.method names from the WebDriver BiDi spec (editor’s draft).


MethodDescription
session.statusReturns whether the remote end can create new sessions
session.newCreates a new BiDi session
session.endEnds the current session
session.subscribeEnables events globally or for specific navigables
session.unsubscribeDisables events globally or for specific navigables
MethodDescription
browser.closeTerminates all WebDriver sessions and cleans up the browser
browser.createUserContextCreates a new user context (profile/container)
browser.getClientWindowsReturns a list of client windows
browser.getUserContextsReturns a list of user contexts
browser.removeUserContextCloses a user context and all its navigables without beforeunload
browser.setClientWindowStateSets the dimensions/state of a client window
browser.setDownloadBehaviorConfigures download behavior (allow/deny, destination folder)
MethodDescription
browsingContext.activateActivates and focuses a top-level traversable
browsingContext.captureScreenshotCaptures a screenshot, returned as a Base64-encoded string
browsingContext.closeCloses a top-level traversable
browsingContext.createCreates a new navigable in a new tab or window
browsingContext.getTreeReturns the tree of all descendant navigables
browsingContext.handleUserPromptCloses an open prompt (alert/confirm/prompt)
browsingContext.locateNodesReturns all nodes matching a locator (CSS, XPath, accessibility, etc.)
browsingContext.navigateNavigates a navigable to a URL
browsingContext.printPrints a document to PDF, returned as a Base64-encoded string
browsingContext.reloadReloads a navigable
browsingContext.setBypassCSPBypasses Content Security Policy enforcement
browsingContext.setViewportSets viewport width, height, and device pixel ratio
browsingContext.traverseHistoryTraverses session history by a delta (back/forward)
MethodDescription
emulation.setForcedColorsModeThemeOverrideOverrides forced-colors mode theming (light/dark)
emulation.setGeolocationOverrideOverrides geolocation coordinates or simulates position error
emulation.setLocaleOverrideOverrides locale for navigables or user contexts
emulation.setNetworkConditionsEmulates network conditions (e.g. offline)
emulation.setScreenOrientationOverrideEmulates screen orientation (portrait/landscape)
emulation.setScreenSettingsOverrideEmulates screen area dimensions
emulation.setScriptingEnabledEmulates disabled JavaScript on web pages
emulation.setScrollbarTypeOverrideOverrides scrollbar type
emulation.setTimezoneOverrideOverrides timezone
emulation.setTouchOverrideEmulates touch input support
emulation.setUserAgentOverrideOverrides User-Agent per navigable, user context, or globally
MethodDescription
network.addDataCollectorAdds a network data collector
network.addInterceptAdds a network intercept for request/response phases
network.continueRequestContinues a request blocked by an intercept
network.continueResponseContinues a response blocked by an intercept (can modify status/headers)
network.continueWithAuthContinues a response blocked at the authRequired phase
network.disownDataReleases collected network data for a given collector
network.failRequestFails a fetch blocked by an intercept
network.getDataRetrieves collected network data if available
network.provideResponseProvides a complete synthetic response for an intercepted request
network.removeDataCollectorRemoves a network data collector
network.removeInterceptRemoves a network intercept
network.setCacheBehaviorConfigures cache behavior (default/bypass)
network.setExtraHeadersSets extra headers that extend or overwrite request headers
MethodDescription
script.addPreloadScriptAdds a script that runs before page scripts on new documents
script.callFunctionCalls a function with arguments in a given realm
script.disownReleases ownership of remote object handles
script.evaluateEvaluates an expression in a given realm
script.getRealmsReturns all realms, optionally filtered by type or navigable
script.removePreloadScriptRemoves a preload script
MethodDescription
input.performActionsPerforms a sequence of user input actions
input.releaseActionsResets input state for the current session
input.setFilesSets the files on an <input type="file"> element
MethodDescription
storage.deleteCookiesRemoves cookies matching the given parameters
storage.getCookiesRetrieves cookies matching the given parameters
storage.setCookieCreates or replaces a cookie in a cookie store
MethodDescription
webExtension.installInstalls a web extension
webExtension.uninstallUninstalls a web extension

EventDescription
browsingContext.contextCreatedA navigable was created
browsingContext.contextDestroyedA navigable was destroyed
browsingContext.domContentLoadedDOMContentLoaded fired in a navigable
browsingContext.downloadEndA download completed or was canceled
browsingContext.downloadWillBeginA download is about to start
browsingContext.fragmentNavigatedA fragment navigation occurred
browsingContext.historyUpdatedHistory was updated (e.g. pushState/replaceState)
browsingContext.loadThe load event fired in a navigable
browsingContext.navigationAbortedA navigation was aborted
browsingContext.navigationCommittedA navigation was committed
browsingContext.navigationFailedA navigation failed
browsingContext.navigationStartedA navigation started
browsingContext.userPromptClosedA user prompt was closed
browsingContext.userPromptOpenedA user prompt was opened
EventDescription
input.fileDialogOpenedA file picker dialog was opened
EventDescription
log.entryAddedA log entry was added (console, JS error, etc.)
EventDescription
network.authRequiredAuthentication was required for a request
network.beforeRequestSentA request is about to be sent
network.fetchErrorA fetch encountered a network error
network.responseCompletedA response completed
network.responseStartedA response started arriving
EventDescription
script.messageA message was sent via a BiDi channel
script.realmCreatedA new realm was created
script.realmDestroyedA realm was destroyed