UiPath Documentation
activities
latest
false

UI Automation activities

Last updated May 21, 2026

SetDeviceOrientation

Changes and then retrieves the orientation of the connected device.

Definition

Namespace: UiPath.MobileAutomation.API.Models

Assembly: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

SetDeviceOrientation(DeviceOrientationEnumC, MobileOptions.SetDeviceOrientationOptions)

ScreenOrientation SetDeviceOrientation(
	    DeviceOrientationEnumC screenOrientationCommand,
	    MobileOptions. SetDeviceOrientationOptions options = null
)
ScreenOrientation SetDeviceOrientation(
	    DeviceOrientationEnumC screenOrientationCommand,
	    MobileOptions. SetDeviceOrientationOptions options = null
)

screenOrientationCommand DeviceOrientationEnumC : Specifies the command for setting the screen orientation. The following options are available:

* `Portrait`
* `Landscape`
* `Toggle`
* `Portrait`
* `Landscape`
* `Toggle`

options MobileOptions.SetDeviceOrientationOptions : Specifies the MobileOptions.SetDeviceOrientationOptions for the SetDeviceOrientation action. Default value is null.

Return value

ScreenOrientation

Returns the new orientation of the device.

  • Definition
  • SetDeviceOrientation(DeviceOrientationEnumC, MobileOptions.SetDeviceOrientationOptions)
  • Return value
  • ScreenOrientation

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated