I am testing the mobile: dragFromToForDuration with Appium v2.0.0-beta.44 and with the latest Java-Client 8.2.0 (did not test with older versions).
And what I see is whatever value I set to the duration argument it does the same speed drag but the delay before the drag changes with the value in seconds.
For example: if the duration is 5, it does nothing 5 seconds and does the same fast drag what it does with duration 0. The fast drag performs like a swipe which is not accurate for some cases.
The dragging coordinates are correct I tested it on a drawing app, but the “duration” seems doesn’t behave as expected, it behaves like a delay before dragging but not as a duration of the dragging process.
Am I missing something in the caps or settings, or else?
This is important as having the drag as a swipe is not accurate and affects on overall tests robustness.
If you look at the description of duration in the link you provided it says:
Float number of seconds in range [0.5, 60]. How long the tap gesture at starting drag point should be before to start dragging
It seems to be working as advertised. This parameter is not about the speed of the drag, but rather the time of the initial click and hold before drag.
Apple documentation embedded in your link seems to confirm this:
Clicks and holds an element for a duration you specify and drags it to the other element.
Oh, my mistake, sorry, and thank you for your time and the answer.
So it is actually and officially delay the a duration. I think the word “duration” confused me to skip the details int the description, If “delay” there will not be that confusion.