* Perform a swipe on the screen or an element. * * ```js * let locator = "#io.selendroid.testapp:id/LinearLayout1"; * I.swipe(locator, 800, 1200, 1000); * ``` * * [See complete reference](http://webdriver.io/api/mobile/swipe.html) * * @param {CodeceptJS.LocatorOrString} lo
(locator, xoffset, yoffset, speed = 1000)
| 1120 | */ |
| 1121 | |
| 1122 | async swipe(locator, xoffset, yoffset, speed = 1000) { |
| 1123 | onlyForApps.call(this) |
| 1124 | const res = await this.browser.$(parseLocator.call(this, locator)) |
| 1125 | // if (!res.length) throw new ElementNotFound(locator, 'was not found in UI'); |
| 1126 | return this.performSwipe(await res.getLocation(), { |
| 1127 | x: (await res.getLocation()).x + xoffset, |
| 1128 | y: (await res.getLocation()).y + yoffset, |
| 1129 | }) |
| 1130 | } |
| 1131 | |
| 1132 | /** |
| 1133 | * Perform a swipe on the screen. |
no test coverage detected