idevice
Developer Tools

WDA

Control WebDriverAgent sessions and bridge WDA endpoints.

WDA support is exposed through WdaClient and WdaBridge. The module handles WebDriverAgent status, sessions, element lookup, and bridged endpoint URLs.

Use It For

  • Wait for WebDriverAgent readiness.
  • Start a WDA session.
  • Find elements through WebDriverAgent.
  • Bridge WDA and MJPEG endpoints.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "wda"] }

Service Names

PathValue
WDA HTTPWebDriverAgent endpoint
BridgeWdaBridge local endpoints

Rust Example

src/main.rs
use std::time::Duration;

use idevice::wda::WdaClient;

let provider = first_provider().await?;
let mut wda = WdaClient::new(&provider);
wda.wait_until_ready(Duration::from_secs(30)).await?;
let session_id = wda.start_session(None).await?;
println!("{session_id}");

CLI Equivalent

No standalone wda subcommand is registered in tools/src/main.rs; WDA is used by XCTest/WDA flows.

Common Errors

ErrorWhat to check
WDA not respondingStart the WDA runner before creating the client or waiting for readiness.
Device port connection failedCheck the provider and device-side WDA ports.
Missing session idCall start_session before APIs that require an active WebDriver session.

Source

On this page