Skip to content

setOrientation ​

Change device orientation between portrait and landscape modes.

Sets the orientation of the virtual device.

Arguments ​

The command accepts one of the following string arguments.

ArgumentDescription
PORTRAITThe device is in an upright, vertical orientation. Default.
LANDSCAPE_LEFTThe device is in a horizontal orientation, rotated 90 degrees counter-clockwise.
LANDSCAPE_RIGHTThe device is in a horizontal orientation, rotated 90 degrees clockwise.
UPSIDE_DOWNThe device is in an inverted, vertical orientation.

Usage examples ​

The following example sets the device orientation to landscape left.

yaml
- setOrientation: LANDSCAPE_LEFT