---
title: Change screen orientation with Appium | TestingBot
description: Appium allows you to automatically change your screen orientation on
  Android and iOS
source_url:
  html: https://testingbot.com/support/app-automate/appium/screen-orientation
  md: https://testingbot.com/support/app-automate/appium/screen-orientation/index.md
---
# Change screen orientation

Appium allows you to change the screen orientation of your iOS and Android devices.   
 You can choose to either change the orientation [at the start of the test](https://testingbot.com#caps) or [during a test](https://testingbot.com#during).

## Set screen orientation at the start of your test
[Ruby](https://testingbot.com#)[Python](https://testingbot.com#)[PHP](https://testingbot.com#)[Java](https://testingbot.com#)[Node](https://testingbot.com#)[C#](https://testingbot.com#)

    capabilities = {
      "appium:orientation" => "LANDSCAPE"
    }

    options.setCapability("appium:orientation", "LANDSCAPE");

    $capabilities = [
      "appium:orientation" => "LANDSCAPE"
    ];

    capabilities = {
      "appium:orientation": "LANDSCAPE"
    }

    const capabilities = {
      "appium:orientation": "LANDSCAPE"
    };

    options.AddAdditionalAppiumOption("appium:orientation", "LANDSCAPE");

## Set screen orientation during a test
[Ruby](https://testingbot.com#)[Python](https://testingbot.com#)[PHP](https://testingbot.com#)[Java](https://testingbot.com#)[Node](https://testingbot.com#)[C#](https://testingbot.com#)

    @driver.rotation = :landscape

    ((AppiumDriver) driver).rotate(ScreenOrientation.LANDSCAPE);

    $driver->rotate("LANDSCAPE");

    driver.orientation = "LANDSCAPE"

    await driver.setOrientation('landscape');

    driver.Orientation = ScreenOrientation.Landscape;

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
