Skip to content

Releases: webdriverio/desktop-mobile

@wdio/tauri-service: v1.0.0

03 May 20:23

Choose a tag to compare

New:

  • Three driver providers: @wdio/tauri-service ships with three ways to connect to a Tauri application — embedded (default, no external binary required), official (external tauri-driver binary), and CrabNebula (macOS-only commercial alternative). The embedded provider is auto-detected on macOS and can be enabled explicitly on Windows and Linux via driverProvider: 'embedded' (#182, #238)
  • browser.tauri API: All Tauri-specific test operations are available on the browser.tauri namespace — execute(), mock(), clearAllMocks(), resetAllMocks(), restoreAllMocks(), switchWindow(), listWindows(), and triggerDeeplink()
  • Command mocking: Mock any Tauri backend command with a full Vitest-compatible interface including mockReturnValue, mockImplementation, mockReturnValueOnce, mockRejectedValue, withImplementation, and call tracking via mock.calls and mock.results. Mocking is implemented via JavaScript-side invoke interception and requires @wdio/tauri-plugin
  • browser.tauri.execute(): Execute arbitrary JavaScript in the Tauri frontend context with access to Tauri APIs. Accepts a function (receiving the full Tauri API object as the first parameter) or a string of code, with optional extra arguments. Requires @wdio/tauri-plugin (#241)
  • Deeplink testing: browser.tauri.triggerDeeplink(url) triggers a custom protocol URL using platform-appropriate system commands (open on macOS, xdg-open on Linux, cmd /c start on Windows). See the Deeplink Testing guide for single-instance plugin setup
  • Multi-window support: browser.tauri.switchWindow(label) and browser.tauri.listWindows() allow tests to target specific named windows. Per-call window overrides are available via withExecuteOptions({ windowLabel }) without changing the session default (#225)
  • Log forwarding: Backend (Rust) and frontend (JS) logs can be captured and forwarded to WebdriverIO's logger via captureBackendLogs and captureFrontendLogs options. Standalone mode writes logs to timestamped files in a configurable logDir
  • Standalone session API: startWdioSession(), cleanupWdioSession(), and createTauriCapabilities() allow managing Tauri sessions outside of the WebdriverIO runner lifecycle — useful for custom test frameworks or one-off automation scripts
  • Multiremote support: Multiple Tauri app instances can be driven in a single test run using WebdriverIO multiremote. Each instance gets its own embedded WebDriver port, and CrabNebula backend cycling is supported for macOS multiremote setups (#184)
  • Auto-install helpers: autoInstallTauriDriver: true installs tauri-driver via Cargo if not found in PATH; autoDownloadEdgeDriver: true downloads a matching MSEdgeDriver on Windows when a version mismatch is detected

Fixed:

  • Script serialization in execute commands for improved cross-context compatibility (#224)
  • Mock failures when using specific Tauri invoke patterns (#235)
  • Error handling and response mapping throughout the service (#198)

Documentation:

Developer:

  • Monorepo: Developed in the webdriverio/desktop-mobile Turborepo monorepo alongside @wdio/electron-service and shared packages (@wdio/native-utils, @wdio/native-types, @wdio/native-spy)
  • Architecture: Service follows the standard WDIO launcher/worker split — TauriLaunchService runs in the main process for driver lifecycle management, TauriWorkerService runs in the worker process for browser.tauri API injection
  • Tooling: Biome alongside ESLint for formatting and linting; TypeScript 5.9+ strict mode throughout
  • Build: TypeScript compiler with dual ESM/CJS output; Node.js 24 LTS
  • Testing: Unit and integration test suite with 80%+ coverage; ESM/CJS compatibility verified via package tests (#215)

Full Changelog: https://github.com/webdriverio/desktop-mobile/commits/wdio-tauri-service@v1.0.0

@wdio/tauri-plugin: v1.0.0

03 May 20:25

Choose a tag to compare

New:

  • plugin:wdio|execute command: Execute arbitrary JavaScript in the Tauri frontend context with access to all Tauri APIs. The script receives the full window.__TAURI__ object as its first argument, enabling direct calls to core.invoke, app, window, and any other Tauri module. Used by browser.tauri.execute() in @wdio/tauri-service
  • JavaScript-side invoke interception: The plugin installs window.__wdio_mocks__ in the frontend to intercept core.invoke() calls before they reach the Rust backend. This allows full command mocking without any Rust-side changes — browser.tauri.mock('my_command') in tests transparently redirects invocations at the JS layer
  • Log forwarding: plugin:wdio|log-frontend forwards JavaScript console output from the frontend to WebdriverIO's logger. Controlled by captureFrontendLogs in @wdio/tauri-service
  • Window management commands: plugin:wdio|get-active-window-label, plugin:wdio|list-windows, and plugin:wdio|get-window-states expose Tauri window metadata to the test process, powering browser.tauri.switchWindow() and browser.tauri.listWindows()
  • TypeScript support: The @wdio/tauri-plugin npm package ships full TypeScript definitions for the frontend API (window.wdioTauri) including execute(), waitForInit(), cleanupAll(), cleanupLogListeners(), and cleanupInvokeInterception()
  • Tauri v2 permission model: All commands are gated by explicit Tauri v2 permissions. "wdio:default" in your capability file grants all plugin capabilities; individual permissions (wdio:allow-execute, wdio:allow-list-windows, etc.) are available for fine-grained control

Developer:

  • Dual package: Ships as both a Rust crate (tauri-plugin-wdio on crates.io) and an npm package (@wdio/tauri-plugin on npm) — the npm package provides the frontend JavaScript and TypeScript types
  • Monorepo: Developed in the webdriverio/desktop-mobile Turborepo monorepo alongside @wdio/tauri-service
  • Build: build.rs generates permission schema without auto-registering commands (avoids Tauri generating duplicate permission identifiers)

Full Changelog: https://github.com/webdriverio/desktop-mobile/commits/wdio-tauri-plugin@v1.0.0

tauri-plugin-wdio-webdriver: v1.0.0

03 May 20:26

Choose a tag to compare

New:

  • Embedded W3C WebDriver server: tauri-plugin-wdio-webdriver embeds a compliant WebDriver HTTP server directly inside your Tauri application, eliminating the need for tauri-driver, msedgedriver, or webkit2gtk-driver. Register it once in your Tauri app and @wdio/tauri-service handles the rest
  • Full cross-platform support: All three major desktop platforms are supported in this release — macOS via WKWebView native APIs, Windows via WebView2 native APIs, and Linux via WebKitGTK native APIs
  • 47 W3C WebDriver endpoints: Session management, navigation, element finding and interaction, shadow DOM, window and frame control, script execution, cookies, user actions, alerts, screenshots, and PDF printing
  • TAURI_WEBDRIVER_PORT env var: Configure the server port at runtime without code changes. @wdio/tauri-service sets this automatically; for standalone use, set it before launching the app. Falls back to port 4445
  • init_with_port(port) API: Set a fixed port programmatically at plugin registration time, taking precedence over the environment variable
  • Standalone W3C client compatibility: The embedded server is compatible with any W3C WebDriver client — WebdriverIO, Selenium Python, or any other conforming client can connect directly

Developer:

  • Renamed from tauri-plugin-wdio-server: The crate was renamed to tauri-plugin-wdio-webdriver for clarity. Update your Cargo.toml if migrating from the pre-release (#182)
  • Forked from Choochmeque/tauri-plugin-webdriver: Extended with WebdriverIO-specific compatibility fixes, health-check endpoint improvements, and the port configuration API (#238)
  • Production safety: Intended as a dev/test-only dependency. Use [target.'cfg(debug_assertions)'.dependencies] or a feature flag to ensure it is excluded from release builds
  • Monorepo: Developed in the webdriverio/desktop-mobile monorepo alongside @wdio/tauri-service

Full Changelog: https://github.com/webdriverio/desktop-mobile/commits/tauri-plugin-wdio-webdriver@v1.0.0

@wdio/electron-service: v10.0.0

30 Apr 15:44

Choose a tag to compare

Previous versions of this package can be found at https://github.com/webdriverio-community/wdio-electron-service.

New:

  • Package renamed to @wdio/electron-service: The service is now an official first-party WebdriverIO package, hosted in the webdriverio/desktop-mobile monorepo. WebdriverIO automatically resolves the 'electron' service name — no configuration changes required. See the v9 → v10 migration guide for full upgrade instructions (#3)
  • Deeplink testing: New browser.electron.triggerDeeplink() command for testing custom protocol handlers, with automatic handling of platform-specific behaviour including the Windows new-instance problem (#59)
  • Console log capture: Electron main and renderer process console output can now be captured into WDIO test logs via the captureMainProcessLogs, captureRendererLogs, mainProcessLogLevel, and rendererLogLevel service options. Standalone mode writes logs to timestamped files (#59)
  • Class mocking: In addition to function-level mocking, the service now supports mocking entire Electron class instances (e.g. Tray, BrowserWindow, Menu) via browser.electron.mock('Tray'). Class mocks provide a __constructor spy and individual spies for all instance methods (#59)
  • electronBuilderConfig option: Specify a path to a custom electron-builder configuration file, useful when you have multiple build configurations (e.g. staging vs. production) that extend a common base (#59)
  • getElectronBinaryPath() utility: New exported helper to resolve the Electron binary path from a given app directory, without needing to start a full session (#59)
  • Bridge stub API: CDP bridge methods are now stubbed before full bridge initialization, preventing errors when bridge APIs are invoked during early app startup (#50)

Breaking Changes:

  • createElectronCapabilities() interface: The helper now accepts a single ElectronServiceOptions object instead of positional arguments. The return type has changed from the ElectronServiceCapabilities union to a single ElectronStandaloneCapability object. See the migration guide for details (#165)

Fixed:

  • Windows multiremote capability handling (#124)
  • Script serialization in execute commands for improved cross-context compatibility (#224)
  • Mock failures when using specific Electron APIs (#235)
  • Improved error handling and logging throughout the service (#197)

Documentation:

Developer:

  • Migration: Migrated to the webdriverio/desktop-mobile Turborepo monorepo, now developed alongside @wdio/tauri-service and a suite of shared packages (@wdio/native-utils, @wdio/native-types, @wdio/native-spy). Additionally, @wdio/cdp-bridge was renamed to @wdio/electron-cdp-bridge.
  • Architecture: Electron service patterns standardised with the Tauri service for consistency across both desktop targets (#158); internal types refactored (#52, #174)
  • Tooling: Biome added alongside ESLint for formatting and linting (#153)
  • Build: TypeScript 5.9+, Node.js 24 LTS, pnpm 10, Turborepo 2.5+
  • Testing: ESM/CJS compatibility verified via package tests (#38); unit and integration test suite improvements (#213)
  • CI: Reworked release workflows using releasekit (#217); security fixes for CodeQL alerts (#116, #117, #119)
  • Maintenance: LTS backporting approach removed in favour of the new monorepo's rolling release model (#104)
  • Dependencies: Updated all dependencies to latest versions including Puppeteer and WebdriverIO (#94, #115, #203, #230)

Full Changelog: https://github.com/webdriverio/desktop-mobile/commits/wdio-electron-service@v10.0.0