iOS rotate (withOptions) parameter "rotation" should be float or double value
I have tried around with the rotate function on an iOS device with different values. There must be a mistake with the rotate parameter. The appium dotnet driver documentation in the AppiumDriver.cs states:
rotations options like the following: /// new Dictionary<string, int> {{"x", 114}, {"y", 198}, {"duration", 5}, /// {"radius", 3}, {"rotation", 220}, {"touchCount", 2}} AppiumDriver.cs
"220" is way to high and not a useful value because the apple ui automation documentation tells you: UIAutomationJavascriptDocumentation
rotation The length of rotation in radians. The default is pi (π).
Whoever came up with this crazy idea to use multiples of pi for the rotation, we should use it this way. So the rotation parameter should not be an int parameter. We clearly need a float or double value to set the correct rotation angle.
one pi or 3.14... will rotate the screen by 180 degree. I have tried this on a map screen. Using 220 as the rotate parameter did nothing useful when using a duration of 5 seconds. These are way to many rotations in such a short time period.
Do I clearly understand that it is feature/enhancement request?
What if this API was refactored? That way: https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/AppiumDriver.java#L558
Values of screen orientation: PORTRAIT and LANDSCAPE What do you think about this variant?
The function "rotateWithOptions" I meant has nothing to do with the screen orientation of the device. It is used for a touch gesture with the given amount of fingers/touchpoints. For example if you want to change the rotation of an image or a map in an app. Usually you put two fingers on the screen and rotate them.
The function you are referring to is for changing the device orientation. This one works perfectly. Nothing to enhance here or add.
Now it is clear. Ok. Will think about it.
@TikhomirovSergey : any update about this ?
Hi @BaN4NaJ0e,
I took a look at the code, and the value : 220 is just an example in the documentation.
in the end you control the parameters that you send.
If it's just a matter of updating the comment we can do that easily.
`///
Execute(AppiumDriverCommand.Rotate, parameters);
} `
Closed since no response