Change screen orientation
You can change the screen orientation of an Android device to set your application in portrait or landscape mode during the execution of the test. In order to change screen orientation, you need to set the deviceOrientation
parameter in the REST API request to start Espresso test execution.
REST API endpoint :
POST /app-automate/espresso/v2/build
Parameter | Description | Values |
---|---|---|
deviceOrientation |
Set the screen orientation of mobile device |
portrait , landscape Default: portrait |
Example cURL
request :
Set the screen orientation to landscape :
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"deviceOrientation": "landscape", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-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
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!