iPhone Duo Automation
The XCUITest driver supports automation of the iPhone Duo. Both simulators and real devices are supported.
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 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.
The hinge angle can be read and changed using the mobile: getSimulatedHingeAngle
and mobile: setSimulatedHingeAngle
execute methods.
The driver does not automatically switch the active display when changing the hinge angle, since more than one display can be active at a time (e.g. when using the camera). The current display must be explicitly changed:
- The
mobile: listDisplaysexecute method can be used to retrieve all available displays - The
currentDisplayIdsetting can be used to change the active display at any time. This setting affects screenshots, W3C actions, MJPEG streams, and new XCTest recordings. Any existing XCTest recordings must be restarted.
Known Limitations¶
mobile: setSimulatedHingeAngleonly works on simulators, whilemobile: getSimulatedHingeAngleworks on both simulators and real devicesmobile: performIoHidEventhas been reported not to work on real devices