Change Device Orientation

You can change the iOS device's screen orientation before an XCUITest session starts by passing in a orientation option.

Device Orientation Example

See the example below on how to change the orientation. You can choose between PORTRAIT (default) and LANDSCAPE.

curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/run" \
-d '{ "options": { "orientation": "LANDSCAPE" }, "capabilities":[{"version":"15.5", "deviceName":"iPhone 13", "platformName":"iOS"}]}' \
-H "Content-Type: application/json"

The default orientation is set to PORTRAIT for all XCUITests.