5 +#
Firefox features: available via WebDriver BiDi vs not 7 +Snapshot of this gecko checkout (recent nightly), verified against source paths below.
8 +Cross-reference: command dispatch and client API notes live in the prototype repo (`~/Workspace/firefox-bidi/research/modules/`).
9 +Feature-detect at runtime: unsupported → `unknown command` / `unsupported operation` error.
11 +##
✅ Available via BiDi 13 +###
Session & capabilities 15 +| Feature | Commands / evidence |
17 +| Session lifecycle | `session.new` (HTTP `POST /session` or on WS), `session.status`, `session.end` — `remote/webdriver-bidi/WebDriverBiDiConnection.sys.mjs:202-227`, `root/session.sys.mjs:80` |
18 +| Event subscriptions, granular | `session.subscribe`/`unsubscribe` with `contexts` (all / top-level browsing contexts / user contexts) — `root/session.sys.mjs:118,234` |
19 +| Capabilities | `acceptInsecureCerts`, `proxy` (pref-backed: direct/pac/system/manual), `pageLoadStrategy`, `strictFileInteractability`, `timeouts`, `unhandledPromptBehavior`, `webSocketUrl` — `remote/shared/webdriver/Capabilities.sys.mjs:33-36,480-486,592,748` |
20 +| Firefox caps | `moz:firefoxOptions` (args + prefs at launch), `moz:accessibilityChecks`, `moz:webdriverClick`, `moz:processID`, `moz:profile` — `Capabilities.sys.mjs:39-41,493-494` |
22 +###
Contexts & navigation 24 +| Feature | Commands / evidence |
26 +| Open/close/inspect contexts | `browsingContext.create` (tab or window), `close`, `getTree` (full iframe tree) — `root/browsingContext.sys.mjs:660,605,946` |
27 +| Navigate/reload/history | `navigate` (wait states), `reload`, `traverseHistory`, `activate` — `browsingContext.sys.mjs:1400,1656,2231,333` |
28 +| Viewport | `browsingContext.setViewport` (viewport + devicePixelRatio) — `browsingContext.sys.mjs:1748` |
29 +| Navigation events | `contextCreated/Destroyed`, `navigationStarted/Committed/Failed`, `fragmentNavigated`, `domContentLoaded`, `load`, `historyUpdated` — `browsingContext.sys.mjs` `supportedEvents` |
30 +| Window management | `browser.getClientWindows`, `browser.setClientWindowState` (normal/maximized/minimized/fullscreen + x/y/width/height) — `root/browser.sys.mjs:205,478`, states `:77-80` |
31 +| User contexts (containers) | `browser.createUserContext`, `getUserContexts`, `removeUserContext` — `browser.sys.mjs:240,291,421` |
35 +| Feature | Commands / evidence |
37 +| JS evaluation | `script.evaluate`, `script.callFunction` — serialization (sharedId/handles, ownership modes), sandbox realms, channels (async result push) — `root/script.sys.mjs:421,556` |
38 +| Preload scripts | `addPreloadScript`/`removePreloadScript` (document-start, args) — `script.sys.mjs:167,733` |
39 +| Realms | `script.getRealms`: `window`, `dedicated-worker`, `shared-worker`, `service-worker` — `script.sys.mjs:678` + unsupported list (audio-worklet/paint-worklet/worker/worklet); events `realmCreated/Destroyed`, `script.message` |
40 +| Element location | `browsingContext.locateNodes`: `css`, `xpath`, `innerText`, `accessibility`, `context` (into iframes); near-miss reporting — `browsingContext.sys.mjs:1118-1167,1224` |
41 +| Screenshots / PDF | `captureScreenshot` (viewport/document origin, clip), `print` (PDF) — `browsingContext.sys.mjs:440,1555` |
45 +| Feature | Commands / evidence |
47 +| Actions | `input.performActions`, `releaseActions` (keyboard, pointer, wheel; per spec input sources) — `root/input.sys.mjs:293,334` |
48 +| File upload | `input.setFiles` + `input.fileDialogOpened` event — `input.sys.mjs:382,410-411` |
52 +| Feature | Commands / evidence |
54 +| Observe | events `beforeRequestSent`, `responseStarted`, `responseCompleted`, `fetchError`, `authRequired` — `root/network.sys.mjs` `supportedEvents` |
55 +| Intercept/modify | `addIntercept`, `continueRequest`, `continueResponse`, `continueWithAuth`, `failRequest`, `provideResponse`, `removeIntercept` — `network.sys.mjs:400-1117` |
56 +| Cache + capture | `setCacheBehavior`; data collectors `addDataCollector`/`getData`/`disownData`/`removeDataCollector` (response body capture) — `network.sys.mjs` |
58 +###
Storage, permissions, extensions, emulation, misc 60 +| Feature | Commands / evidence |
62 +| Cookies (partitioned) | `storage.getCookies`/`setCookie`/`deleteCookies` with `partition` (incl. user contexts) — `root/storage.sys.mjs:157,199,258` |
63 +| Permissions | `permissions.setPermission` (granted/denied, per origin + user context) — `root/permissions.sys.mjs:54-114` |
64 +| Extensions | `webExtension.install` (`moz:allowPrivateBrowsing`, `moz:permanent`), `uninstall`, `moz:listExtensions` — `root/webExtension.sys.mjs:141,237,263` |
65 +| Emulation (7) | `emulation.setGeolocationOverride`, `setLocaleOverride`, `setNetworkConditions` (throttling), `setScreenOrientationOverride`, `setScreenSettingsOverride`, `setTimezoneOverride`, `setUserAgentOverride` — `root/emulation.sys.mjs:137-631`; windowglobal variants → per-context |
66 +| Prompts | `browsingContext.handleUserPrompt` + `userPromptOpened/Closed` events — `browsingContext.sys.mjs:1039` |
67 +| Downloads | `browser.setDownloadBehavior` (global or per user context, null resets) + `downloadWillBegin`/`downloadEnd` events — `browser.sys.mjs:317`, BC `supportedEvents` |
68 +| Console logging | `log.entryAdded` (console API + JS errors with stack traces) — `modules/log.md` |
69 +| Screencast (recording) | `browsingContext.startScreencast`/`stopScreencast` → webm file on disk (no audio, no frame streaming) — `browsingContext.sys.mjs:1968,2187` |
71 +###
Firefox-only extensions (`moz:` namespace) 73 +| Feature | Commands / evidence |
75 +| JS debugger | `moz.debugging.setDebuggerEnabled`, `setBreakpoint`, `removeBreakpoint`, `resume`, `stepOver/Into/Out`, `listScripts`, `getScriptSource` — `root/moz/debugging.sys.mjs:77-346` |
76 +| Gecko profiler | `moz.profiler.start`/`stop` — `root/moz/profiler.sys.mjs:60,206` |
78 +##
⚠️ Partial / caveated 80 +- **Worker realms**: listable (`getRealms` accepts service/dedicated/shared worker types) but worklets unsupported; evaluation *inside* worker realms not verified in this checkout — UNVERIFIED.
81 +- **Screencast**: file-based webm recording only; no per-frame `screencastFrame` event streaming, no audio track — `browsingContext.sys.mjs:1927-1966`.
82 +- **Downloads**: behavior config + events only; BiDi never hands you the file, `setDownloadBehavior` chooses folder.
83 +- **Proxy**: session-start only, applies profile-wide via prefs — no per-context proxy.
84 +- **Permissions**: set-only; no read/query command.
85 +- **Emulation resets**: per-command `null` reset semantics vary; no clear-all command.
86 +- **Multiple sessions**: many sessions per browser OK, but each WS serves exactly one session (`wire-protocol.md`); no event broadcast across sessions.
88 +##
❌ Not available via BiDi (as of this checkout) 90 +| Missing feature | Evidence / workaround |
92 +| localStorage / sessionStorage inspection & mutation (spec'd `storage.*` item commands) | `root/storage.sys.mjs` implements cookies only → workaround: `script.evaluate("localStorage…")` |
93 +| `browsingContext.setBypassCSP` | absent from `root/browsingContext.sys.mjs` → preload scripts can't violate CSP either |
94 +| `browsingContext.navigationAborted` event | not in BC `supportedEvents` |
95 +| Abort/redirect a navigation request proactively | interception reacts to network layer; no navigation-level cancel command |
96 +| Pre-provisioned HTTP auth credentials | must react to `network.authRequired` with `continueWithAuth` — no credential store command |
97 +| Browser chrome/UI automation (menus, toolbars, DevTools UI, profile manager) | no chrome-scope BiDi modules (`ModuleRegistry`: webcontent destinations only). Escape hatch: `--remote-allow-system-access` + script evaluation in privileged scope — powerful, unsupported for normal automation |
98 +| Runtime prefs management | prefs only at launch (`moz:firefoxOptions.prefs`); no prefs module |
99 +| Full accessibility-tree snapshot (spec proposal) | only `locateNodes` with `accessibility` locator |
100 +| Performance metrics / JS coverage / heap snapshots (CDP-parity) | no BiDi module; `moz.profiler` is the only adjacent tool |
101 +| Clipboard read/write, notifications permission prompts beyond `setPermission` | no commands |
102 +| Device/mobile emulation combos (touch forcing, device descriptors) | only UA + viewport + orientation + locale + timezone + networkConditions |
103 +| Remote (non-loopback) exposure | listener binds localhost by design; no auth/TLS — tunnel via SSH |
104 +| BiDi control of the Firefox UI window chrome / OS dialogs | OS-level; only `input.fileDialogOpened` interception for file pickers |
105 +| Gamepad, geolocation *watch* mocking beyond override, WebRTC fakery | no commands |
107 +##
Quick check recipe 109 +Ground truth for "does Firefox X support Y": `gecko/remote/webdriver-bidi/modules/ModuleRegistry.sys.mjs` (module list) + grep the root module for `async <command>(` and `supportedEvents`. Missing there = not available, regardless of spec.