This documentation is deprecated. Please refer to the README in the Appium repository or Appium 2.0 documentation.

  Edit this Doc Rotate

Rotate the device in three dimensions

Example Usage

driver.rotate(new DeviceRotation(10, 10, 10));

# Not supported
// webdriver.io example
driver.rotateDevice(100, 100);

// wd example
driver.rotateDevice({x: 114, y: 198, duration: 5, radius: 3, rotation: 220, touchCount: 2});

# Not supported
# Not supported
driver.Rotate(new Dictionary<string, int> { { "x", 114 }, { "y", 198 }, { "duration", 5 }, { "radius", 3 }, { "rotation", 220 }, { "touchCount", 2 } });

Support

Appium Server

Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest None None None
UIAutomation 8.0 to 9.3 All All
Android UiAutomator2 None None None
Espresso None None None
UiAutomator None None None
Mac Mac None None None
Windows Windows None None None

Appium Clients

Language Support Documentation
Java All appium.github.io
Python All
Javascript (WebdriverIO) All
Javascript (WD) All github.com
Ruby All
C# All github.com

HTTP API Specifications

Endpoint

POST /session/:session_id/appium/device/rotate

URL Parameters

name description
session_id ID of the session to route the command to

JSON Parameters

name type description
x number x offset to use for the center of the rotate gesture
y number y offset to use for the center of the rotate gesture
radius number The distance in points from the center to the edge of the circular path
rotation number The length of rotation in radians
touchCount number The number of touches to use in the specified gesture. (Effectively, the number of fingers a user would use to make the specified gesture.) Valid values are 1 to 5.
duration number The length of hold time for the specified gesture, in seconds.

Response

null

See Also