use of org.openqa.selenium.remote.Response in project java-client by appium.
the class AppiumDriver method rotation.
@Override
public DeviceRotation rotation() {
Response response = execute(DriverCommand.GET_SCREEN_ROTATION);
DeviceRotation deviceRotation = new DeviceRotation((Map<String, Number>) response.getValue());
if (deviceRotation.getX() < 0 || deviceRotation.getY() < 0 || deviceRotation.getZ() < 0) {
throw new WebDriverException("Unexpected orientation returned: " + deviceRotation);
}
return deviceRotation;
}
Aggregations