iPhone Duo Automation
The XCUITest driver supports automation of the iPhone Duo simulator.
Duo sessions have the following minimum requirements:
- XCUITest driver 12.17.0 or later (WebDriverAgent 16.14.2 or later)
- Xcode 27.1 or later
Duo sessions use the standard iOS simulator setup with platformName: iOS.
Session Actions¶
Duo apps are automated the same way as regular iOS/iPadOS apps - the standard
findElement/click methods and other native element interactions work as usual.
Available displays can be listed with
mobile: listDisplays.
Use the currentDisplayId setting to select the
display for screenshots, W3C actions, WDA MJPEG, and new XCTest recordings.
Folding does not update this setting: select the inner display when opening Duo and the outer
display when closing it. Restart XCTest recording to change its display.
The simulated hinge angle can be read and changed through the
mobile: getSimulatedHingeAngle and
mobile: setSimulatedHingeAngle
extensions.
Simulator Home, volume up/down, lock/unlock, and hinge changes use the Mac-side
@appium/coresim HID service through appium-ios-simulator. Hinge readings remain
in WDA. Orientation and rotation commands use WDA on both simulators and
physical devices because WDA's internal animation-stability wait and orientation
verification are required. Physical devices use XCTest for button commands;
simulated hinge changes are unsupported.
Known Limitations¶
mobile: setSimulatedHingeAngleonly supports simulators.mobile: getSimulatedHingeAnglesupports both simulators and real devices with an available hinge sensor and CoreMotion readings. The setter returns after submitting the event, without waiting for folding to finish. Poll the getter when a subsequent operation depends on reaching a target angle. A matching angle does not guarantee that the app has finished updating its layout.- On Duo simulators,
mobile: pressButtonuses CoreSim forhome,volumeup, andvolumedown; other names are unsupported.mobile: performIoHidEventforwards all valid HID page/usage values to CoreSim, including keyboard events. The runtime determines which events have an effect; successful submission alone does not confirm application. mobile: performIoHidEventhas been reported not to work on real Duo devices.