Rotate the device in three dimensions

Example Usage

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

# Not supported
// example
driver.rotate(100, 100);

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

# Not supported
// TODO C# sample

// TODO PHP sample


Appium Server

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

Appium Clients

Language Support Documentation
Java All
Python All
Javascript (WebdriverIO) All
Javascript (WD) All
Ruby All
C# All

HTTP API Specifications


POST /wd/hub/session/:session_id/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.



See Also