> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# rotate

> Rotate the device orientation.

Rotates the device to portrait or landscape. The simplified form takes the
orientation as a single string.

## Parameters

| Parameter     | Type                    | Required | Description                                                 |
| ------------- | ----------------------- | -------- | ----------------------------------------------------------- |
| `orientation` | `portrait \| landscape` | Yes      | Target orientation.                                         |
| `saveAs`      | `string`                | No       | Variable to store this step's return value on `env.<name>`. |
| `retries`     | `number`                | No       | Times to retry the step on failure before failing the test. |
| `skipped`     | `boolean`               | No       | Skip this step at execution time.                           |

## Shorthand

Orientation as a single string.

```yaml theme={null}
- rotate: landscape
```

## Examples

```yaml theme={null}
- rotate:
    orientation: portrait
```

## Related

* [Test format](/core-concepts/test-format)
