Rotate
Change the device orientation:Orientations
| Value | Description |
|---|---|
"portrait" | Normal upright orientation (default) |
"left" | Landscape with home button on left |
"right" | Landscape with home button on right |
"upside_down" | Portrait but upside down |
Screen Dimensions
When the device rotates, the effective screen dimensions change:The
phone.width and phone.height properties represent the physical screen dimensions, which don’t change with rotation. Your tap coordinates should account for the current orientation.Examples
Test Landscape Layout
Test All Orientations
Video App Workflow
Tips
Wait after rotation
Wait after rotation
The screen takes a moment to rotate. Add a short delay (0.3-0.5s) after rotating before performing other actions.
Rotation lock
Rotation lock
If rotation doesn’t work, the device’s rotation lock might be enabled. Check Control Center settings.
App-specific behavior
App-specific behavior
Some apps lock to specific orientations. The rotate command changes the device orientation, but the app may not respond.