* Perform a swipe on the screen. * * ```js * I.performSwipe({ x: 300, y: 100 }, { x: 200, y: 100 }); * ``` * * @param {object} from * @param {object} to * * Appium: support Android and iOS
(from, to)
| 1142 | * Appium: support Android and iOS |
| 1143 | */ |
| 1144 | async performSwipe(from, to) { |
| 1145 | await this.browser.performActions([ |
| 1146 | { |
| 1147 | id: uuidv4(), |
| 1148 | type: 'pointer', |
| 1149 | parameters: { |
| 1150 | pointerType: 'touch', |
| 1151 | }, |
| 1152 | actions: [ |
| 1153 | { |
| 1154 | duration: 0, |
| 1155 | x: from.x, |
| 1156 | y: from.y, |
| 1157 | type: 'pointerMove', |
| 1158 | origin: 'viewport', |
| 1159 | }, |
| 1160 | { |
| 1161 | button: 1, |
| 1162 | type: 'pointerDown', |
| 1163 | }, |
| 1164 | { |
| 1165 | duration: 200, |
| 1166 | type: 'pause', |
| 1167 | }, |
| 1168 | { |
| 1169 | duration: 600, |
| 1170 | x: to.x, |
| 1171 | y: to.y, |
| 1172 | type: 'pointerMove', |
| 1173 | origin: 'viewport', |
| 1174 | }, |
| 1175 | { |
| 1176 | button: 1, |
| 1177 | type: 'pointerUp', |
| 1178 | }, |
| 1179 | ], |
| 1180 | }, |
| 1181 | ]) |
| 1182 | await this.browser.pause(2000) |
| 1183 | } |
| 1184 | |
| 1185 | /** |
| 1186 | * Perform a swipe down on an element. |
no outgoing calls
no test coverage detected