Skip to content

Backends

wavexis supports two backends with full feature parity as of v1.7.0.

CDP backend (cdpwave)

The default backend. Uses the Chrome DevTools Protocol directly.

pip install wavexis[cdp]

All 100+ methods are supported natively.

BiDi backend (bidiwave)

WebDriver BiDi backend. Uses a combination of:

  • BiDi native commandsbrowsingContext.navigate, script.evaluate, storage.getCookies, etc.
  • JS workaroundsscript.evaluate with JavaScript for DOM, CSS, service workers, animations, cache storage
  • CDP bridgebrowser.cdp.sendCommand for Debugger, WebAuthn, WebAudio, Media, Cast, Bluetooth, performance profiling, accessibility, IndexedDB, HAR
pip install wavexis[bidi]

All 100+ methods are supported. Zero NotImplementedError.

BiDi implementation strategies

Strategy Used for
BiDi native Navigation, screenshots, tabs, cookies, contexts, dialogs, permissions, input, storage
JS workaround DOM, CSS inspection, overlay, cache storage, service workers, animations
CDP bridge Performance profiling, accessibility, debug, HAR, IndexedDB, WebAuthn, WebAudio, Media, Cast, Bluetooth, security, downloads, extensions, preferences

Selecting a backend

Use the --backend global flag:

wavexis --backend cdp screenshot https://example.com -o out.png
wavexis --backend bidi screenshot https://example.com -o out.png

Checking installation

wavexis install_check

Output:

  cdp: 2.0.1
  bidi: 1.7.2

Listing available backends

wavexis backends

When to use which

  • CDP — Chrome/Edge only. Most direct protocol access. Best for debugging and profiling.
  • BiDi — Works with any WebDriver BiDi-compatible browser (Chrome, Firefox, Safari). Best for cross-browser automation. Falls back to CDP bridge for Chrome-specific features.

Graceful backend degradation

If the preferred backend cannot be created (e.g. dependency not installed), wavexis automatically falls back to the next available backend. This is handled by BackendManager.select_with_fallback():

# Prefers CDP, falls back to BiDi if cdpwave is not installed
wavexis screenshot https://example.com -o out.png

# Prefers BiDi, falls back to CDP if bidiwave is not installed
wavexis --backend bidi screenshot https://example.com -o out.png

This applies to both CLI commands and serve mode. The fallback only handles backend creation failures (e.g. ImportError). Browser launch failures are handled by each action's error handling.