browser module

The browser module contains commands for managing the browser, including client windows, user contexts, and download behavior.

Client windows

A client window is an OS-level browser window, which includes the viewport (the area where web content is displayed) and browser UI elements such as the address bar and toolbars.

Each client window has the following properties:

  • A unique string identifier (clientWindow).
  • A state (state) indicating whether the window is normal, maximized, minimized, or fullscreen.
  • An active state (active) indicating whether the window can receive keyboard input from the operating system.
  • A position expressed as x and y coordinates in CSS pixels from the left and top edges of the screen, respectively.
  • A size expressed as width and height in CSS pixels.

A list of client windows can be obtained using browser.getClientWindows and their state can be changed using browser.setClientWindowState.

User contexts

A user context is a collection of zero or more top-level contexts (tabs) within the browser. Tabs within the same user context share the same browser storage (such as cookies and session data), while tabs in different user contexts are completely isolated from one another and do not share any browser data. A user context with no tabs is called an empty user context.

Each user context has a unique string identifier (user context ID). The browser always has a default user context with the ID "default", which cannot be removed.

Multiple tabs from different user contexts can share the same client window.

User contexts can be created using browser.createUserContext and removed using browser.removeUserContext.

Commands

Events

The browser module has no associated events.

Specifications

Specification
WebDriver BiDi
# module-browser

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
browser
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 117 (Release date: 2023-08-29)
footnote Full support
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 117 (Release date: 2023-08-29)
footnote Full support
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
browser.close command
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 117 (Release date: 2023-08-29)
footnote
footnote Before Firefox 129, beforeunload prompts could not be skipped.
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 288103
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 117 (Release date: 2023-08-29)
footnote
footnote Before Firefox for Android 129, beforeunload prompts could not be skipped.
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 288103
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 288103
browser.createUserContext command
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 288104
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 288104
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 288104
acceptInsecureCerts parameter
Chrome – Full support
Chrome 138 (Release date: 2025-06-24)
footnote Full support
Edge – Full support
Edge 138 (Release date: 2025-06-26)
footnote Full support
Firefox – Full support
Firefox 140 (Release date: 2025-06-24)
footnote Full support
Opera – Full support
Opera 122 (Release date: 2025-09-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 138 (Release date: 2025-06-24)
footnote Full support
Firefox for Android – Full support
Firefox for Android 140 (Release date: 2025-06-24)
footnote Full support
Opera Android – Full support
Opera Android 91 (Release date: 2025-08-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 138 (Release date: 2025-06-24)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
proxy parameter
Chrome – Full support
Chrome 138 (Release date: 2025-06-24)
footnote Full support
Edge – Full support
Edge 138 (Release date: 2025-06-26)
footnote Full support
Firefox – Full support
Firefox 141 (Release date: 2025-07-22)
footnote
footnote Only supports direct and manual proxy configurations, not autodetect, pac, and system.
Opera – Full support
Opera 122 (Release date: 2025-09-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 138 (Release date: 2025-06-24)
footnote Full support
Firefox for Android – Full support
Firefox for Android 141 (Release date: 2025-07-22)
footnote
footnote Only supports direct and manual proxy configurations, not autodetect, pac, and system.
Opera Android – Full support
Opera Android 91 (Release date: 2025-08-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 138 (Release date: 2025-06-24)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
unhandledPromptBehavior parameter
Experimental
Chrome – Full support
Chrome 140 (Release date: 2025-09-02)
footnote Full support
Edge – Full support
Edge 140 (Release date: 2025-09-05)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1975279
Opera – Full support
Opera 124 (Release date: 2025-11-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 140 (Release date: 2025-09-02)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1975279
Opera Android – Full support
Opera Android 92 (Release date: 2025-10-08)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 140 (Release date: 2025-09-02)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
browser.getClientWindows command
Chrome – Partial support
Chrome 133 (Release date: 2025-02-04)
footnote Partial support
footnote Basic support
Edge – Partial support
Edge 133 (Release date: 2025-02-06)
footnote Partial support
footnote Basic support
Firefox – Full support
Firefox 134 (Release date: 2025-01-07)
footnote Full support
Opera – Partial support
Opera 118 (Release date: 2025-04-15)
footnote Partial support
footnote Basic support
Safari – No support
Safari
footnote
footnote See bug 288106
Chrome Android – Partial support
Chrome Android 133 (Release date: 2025-02-04)
footnote Partial support
footnote Basic support
Firefox for Android – Full support
Firefox for Android 134 (Release date: 2025-01-07)
footnote Full support
Opera Android – Partial support
Opera Android 88 (Release date: 2025-03-19)
footnote Partial support
footnote Basic support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 288106
Samsung Internet – Partial support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Partial support
footnote Basic support
WebView Android – Partial support
WebView Android 133 (Release date: 2025-02-04)
footnote Partial support
footnote Basic support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 288106
browser.getUserContexts command
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 288107
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 288107
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 288107
browser.removeUserContext command
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 288108
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 288108
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 288108
userContext parameter
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 124 (Release date: 2024-03-19)
footnote Full support
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 124 (Release date: 2024-03-19)
footnote Full support
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
browser.setClientWindowState command
Chrome – Partial support
Chrome 126 (Release date: 2024-06-11)
footnote Partial support
footnote Basic support
Edge – Partial support
Edge 126 (Release date: 2024-06-13)
footnote Partial support
footnote Basic support
Firefox – Preview support
Firefox 151 (Release date: 2026-05-19)
footnote Preview browser support
Opera – Partial support
Opera 112 (Release date: 2024-07-11)
footnote Partial support
footnote Basic support
Safari – No support
Safari
footnote
footnote See bug 288109
Chrome Android – Partial support
Chrome Android 126 (Release date: 2024-06-11)
footnote Partial support
footnote Basic support
Firefox for Android – Preview support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Preview browser support
Opera Android – Partial support
Opera Android 83 (Release date: 2024-06-25)
footnote Partial support
footnote Basic support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 288109
Samsung Internet – Partial support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Partial support
footnote Basic support
WebView Android – Partial support
WebView Android 126 (Release date: 2024-06-11)
footnote Partial support
footnote Basic support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 288109
clientWindow parameter
Chrome – Partial support
Chrome 126 (Release date: 2024-06-11)
footnote Partial support
footnote Basic support
Edge – Partial support
Edge 126 (Release date: 2024-06-13)
footnote Partial support
footnote Basic support
Firefox – Preview support
Firefox 151 (Release date: 2026-05-19)
footnote Preview browser support
Opera – Partial support
Opera 112 (Release date: 2024-07-11)
footnote Partial support
footnote Basic support
Safari – No support
Safari
footnote No support
Chrome Android – Partial support
Chrome Android 126 (Release date: 2024-06-11)
footnote Partial support
footnote Basic support
Firefox for Android – Preview support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Preview browser support
Opera Android – Partial support
Opera Android 83 (Release date: 2024-06-25)
footnote Partial support
footnote Basic support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Partial support
footnote Basic support
WebView Android – Partial support
WebView Android 126 (Release date: 2024-06-11)
footnote Partial support
footnote Basic support
WebView on iOS – No support
WebView on iOS
footnote No support
height parameter
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Partial support
Firefox 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting width and height coordinates individually.
footnote Preview browser support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – Partial support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting width and height coordinates individually.
footnote Preview browser support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
state parameter
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Preview support
Firefox 151 (Release date: 2026-05-19)
footnote Preview browser support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – Preview support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Preview browser support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
width parameter
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Partial support
Firefox 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting width and height coordinates individually.
footnote Preview browser support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – Partial support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting width and height coordinates individually.
footnote Preview browser support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
x parameter
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Partial support
Firefox 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting x and y coordinates individually.
footnote Preview browser support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – Partial support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting x and y coordinates individually.
footnote Preview browser support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
y parameter
Experimental
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Partial support
Firefox 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting x and y coordinates individually.
footnote Preview browser support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android
footnote No support
Firefox for Android – Partial support
Firefox for Android 151 (Release date: 2026-05-19)
footnote Partial support
footnote Doesn't support setting x and y coordinates individually.
footnote Preview browser support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
browser.setDownloadBehavior command
Chrome – Full support
Chrome 142 (Release date: 2025-10-28)
footnote Full support
Edge – Full support
Edge 142 (Release date: 2025-10-31)
footnote Full support
Firefox – Full support
Firefox 149 (Release date: 2026-03-24)
footnote Full support
Opera – Full support
Opera 126 (Release date: 2026-01-08)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 303204
Chrome Android – Full support
Chrome Android 142 (Release date: 2025-10-28)
footnote Full support
Firefox for Android – Full support
Firefox for Android 149 (Release date: 2026-03-24)
footnote Full support
Opera Android – Full support
Opera Android 93 (Release date: 2025-11-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 303204
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 142 (Release date: 2025-10-28)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 303204
downloadBehavior parameter
Chrome – Full support
Chrome 142 (Release date: 2025-10-28)
footnote Full support
Edge – Full support
Edge 142 (Release date: 2025-10-31)
footnote Full support
Firefox – Full support
Firefox 149 (Release date: 2026-03-24)
footnote Full support
Opera – Full support
Opera 126 (Release date: 2026-01-08)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 142 (Release date: 2025-10-28)
footnote Full support
Firefox for Android – Full support
Firefox for Android 149 (Release date: 2026-03-24)
footnote Full support
Opera Android – Full support
Opera Android 93 (Release date: 2025-11-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 142 (Release date: 2025-10-28)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
userContexts parameter
Chrome – Full support
Chrome 142 (Release date: 2025-10-28)
footnote Full support
Edge – Full support
Edge 142 (Release date: 2025-10-31)
footnote Full support
Firefox – Full support
Firefox 149 (Release date: 2026-03-24)
footnote Full support
Opera – Full support
Opera 126 (Release date: 2026-01-08)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 142 (Release date: 2025-10-28)
footnote Full support
Firefox for Android – Full support
Firefox for Android 149 (Release date: 2026-03-24)
footnote Full support
Opera Android – Full support
Opera Android 93 (Release date: 2025-11-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 142 (Release date: 2025-10-28)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
In development. Supported in a pre-release version.
In development. Supported in a pre-release version.
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.