Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

Change screen orientation

You can change the screen orientation of an iOS to set your application in portrait or landscape mode during the execution of the test. In order to change screen orientation, you need to pass the deviceOrientation parameter as shown in the table below.

REST API endpoint :

POST /app-automate/xcuitest/v2/build
Parameter Description Values
deviceOrientation Set the screen orientation of the mobile device portrait, landscape
Default: portrait

Example cURL request :

Change the screen orientation to landscape :

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"deviceOrientation": "landscape", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://6eb1fa3c284ddbe9971b2d1aee0d52943b9c081"}' \
-H "Content-Type: application/json"

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle