.setPortrait()
Sets the device orientation to portrait.
Usage
device.setPortrait()
Returns
Promise: A promise that resolves once the orientation has been set.
Support
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Web | Unknown |
Examples
Set device orientation to portrait:
const { device, expect } = require("appdriver");
(async () => {
await device.setPortrait();
return expect(device.isPortrait()).toBeTruthy();
})();