iOS — Direct via WebDriverAgent
Most iOS automation stacks put an Appium server between you and the phone. Qirabot's built-in WDA client skips it: it talks HTTP directly to a WebDriverAgent already running on the device. No Appium, no node, no extra Python packages — the core install is enough.
Element location is AI vision on the screenshot, so there are no XCUITest element queries to maintain, and apps that resist accessibility inspection (games, custom-rendered UIs) work the same as native ones.
The quickest check is the CLI (WDA must be running — setup below):
qirabot ios "Send hi to Alice on WeChat" --bundle-id com.tencent.xinThe same thing in Python:
from qirabot import Qirabot, WdaClient
client = WdaClient("http://127.0.0.1:8100")
client.app_launch("com.apple.Preferences")
bot = Qirabot().bind(client)
result = bot.ai("Open General > About and report the iOS version")
print(f"Success: {result.success}")
bot.close()Real-device setup (3 steps)
- Run WebDriverAgent on the phone and keep it running. WebDriverAgent is Appium's open-source iOS agent — clone appium/WebDriverAgent, open it in Xcode, and run the
WebDriverAgentRunnerscheme against the device with your own signing team (orxcodebuild ... -destination 'id=<udid>' -allowProvisioningUpdates test). You only need the agent itself — no Appium server. - Forward the port over USB:
iproxy 8100 8100(fromlibimobiledevice—brew install libimobiledeviceon macOS). Sanity check:curl http://127.0.0.1:8100/statusreturns JSON. - Run your task — the default
--wda-url(http://127.0.0.1:8100) now reaches the phone.
The device is selected by --wda-url, not by name. For multiple devices, run one iproxy per device on different local ports and select with --wda-url.
Simulators
For simulators, use the Appium engine instead: pass --device with a simulator device type (a name from xcrun simctl list devicetypes, e.g. iPhone 15) — Appium creates and boots a matching simulator. Requires qirabot[appium].
qirabot ios "..." --device "iPhone 15"Note: the Appium engine currently targets simulators only (there is no --udid option) — real devices go through the WDA-direct path above. If you already run Appium (or a device cloud), see Appium + Qirabot.
Device screen recording
The default recorder captures the host screen, which a phone doesn't appear on. For iOS runs, record WDA's MJPEG stream instead (port 9100; USB real device: iproxy 9100 9100 alongside the usual 8100 forward — needs ffmpeg on the host):
bot = Qirabot(record_mjpeg_url="http://127.0.0.1:9100")From the CLI, qirabot ios "..." --record does this automatically and checks the stream is reachable before starting; --mjpeg-url overrides the default. Report layout and all recording knobs: Reports & Recording.
Platform notes
- iOS has no back button;
bot.go_back()performs the universal left-edge swipe gesture. long_pressis available;hoveris a no-op,right_clickdegrades to a tap;clear_textis a best-effort backspace burst (no element model over raw WDA — by design).- Coming from Airtest 1.x?
connect_device("iOS:///http://...:8100")becomesWdaClient("http://...:8100"), anddev.driver.app_launch(...)becomesclient.app_launch(...). - Full per-action behavior: platform support matrix.