mirror of
https://github.com/appium/appium.git
synced 2026-01-26 12:18:51 -06:00
Shift milliseconds to seconds in swipe
This commit is contained in:
@@ -267,12 +267,14 @@ exports.performTouch = function (req, res) {
|
||||
// press-wait-moveTo-release is `swipe`, so use native method
|
||||
if (gestures.length === 4) {
|
||||
if ((gestures[0].action === 'press') && (gestures[1].action === 'wait') && (gestures[2].action === 'moveTo') && (gestures[3].action === 'release')) {
|
||||
// the touch action api uses ms, we want seconds
|
||||
var duration = gestures[1].options.ms / 1000;
|
||||
var body = {
|
||||
startX: gestures[0].options.x,
|
||||
startY: gestures[0].options.y,
|
||||
endX: gestures[2].options.x,
|
||||
endY: gestures[2].options.y,
|
||||
duration: gestures[1].options.ms
|
||||
duration: duration
|
||||
};
|
||||
req.body = body;
|
||||
return exports.mobileSwipe(req, res);
|
||||
|
||||
Reference in New Issue
Block a user