mirror of
https://github.com/appium/appium.git
synced 2026-01-24 19:28:59 -06:00
14 lines
293 B
JavaScript
14 lines
293 B
JavaScript
"use strict";
|
|
|
|
var wd = require('wd');
|
|
|
|
exports.swipe = function (opts) {
|
|
var action = new wd.TouchAction();
|
|
action
|
|
.press({x: opts.startX, y: opts.startY})
|
|
.wait(opts.duration)
|
|
.moveTo({x: opts.endX, y: opts.endY})
|
|
.release();
|
|
return this.performTouchAction(action);
|
|
};
|