Set screen orientation - operation

  • Android - mobile devices
  • Apple iPhone / iPad (iOS)

This operation sets the orientation of the app on the device screen to one of the following.


Change the app orientation on the screen

Sets the orientation of the app on the device screen to one of the below mentioned values.

  • Portrait
  • Portrait (upside down/reversed)
    • does not work on iOS devices when Face ID is used for authentication
  • Landscape (left)
  • Landscape (right/reversed)

To perform this operation in the Suitest Test editor use the Set screen orientation line:

Set orientation example

To perform this operation in the Suitest JavaScript API use the setScreenOrientation command:

// using string value
await suitest.setScreenOrientation('landscapeReversed');
// using constant
await suitest.setScreenOrientation(suitest.SCREEN_ORIENTATION.LANDSCAPE_REVERSED);