Skip to content

Commit

Permalink
fix: updated performSwipe with w3c protocol (#4154)
Browse files Browse the repository at this point in the history
* updated performSwipe with w3c protocol

* chore(deps-dev): bump @wdio/utils from 8.27.2 to 8.28.8 (#4152)

* fix: I.say would be added to Test.steps object (#4145)

* release 3.5.12 (#4156)

* release 3.5.12

* fix(webapi): selectOption method (#4157)

trim text content value

* DOC: Update contributor faces

* fixed typescript parameter inputs count

* chore(deps-dev): bump testcafe from 3.3.0 to 3.5.0 (#4160)

Bumps [testcafe](https://github.com/DevExpress/testcafe) from 3.3.0 to 3.5.0.
- [Release notes](https://github.com/DevExpress/testcafe/releases)
- [Changelog](https://github.com/DevExpress/testcafe/blob/master/CHANGELOG.md)
- [Commits](DevExpress/testcafe@v3.3.0...v3.5.0)

---
updated-dependencies:
- dependency-name: testcafe
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* updated performSwipe with w3c protocol

* fixed typescript parameter inputs count

* chore(deps-dev): bump @wdio/sauce-service from 8.27.0 to 8.29.1 (#4161)

* removed elementId parameter

* updated performSwipe with w3c protocol

* fixed typescript parameter inputs count

* removed elementId parameter

* run mobile tests

* run mobile tests

* run mobile tests

* tweak ci

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: KobeN <7845001+kobenguyent@users.noreply.github.com>
Co-authored-by: Roman Diachenko <dyaroman@gmail.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: kobenguyent <kobenguyent@gmail.com>
  • Loading branch information
6 people authored Feb 2, 2024
1 parent 5e9c486 commit 3b34ae6
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions lib/helper/Appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ let webdriverio;

const fs = require('fs');
const axios = require('axios').default;
const { v4: uuidv4 } = require('uuid');

const Webdriver = require('./WebDriver');
const AssertionFailedError = require('../assert/error');
Expand Down Expand Up @@ -1088,17 +1089,40 @@ class Appium extends Webdriver {
* Appium: support Android and iOS
*/
async performSwipe(from, to) {
await this.browser.touchPerform([{
action: 'press',
options: from,
}, {
action: 'wait',
options: { ms: 1000 },
}, {
action: 'moveTo',
options: to,
}, {
action: 'release',
await this.browser.performActions([{
id: uuidv4(),
type: 'pointer',
parameters: {
pointerType: 'touch',
},
actions: [
{
duration: 0,
x: from.x,
y: from.y,
type: 'pointerMove',
origin: 'viewport',
},
{
button: 1,
type: 'pointerDown',
},
{
duration: 600,
type: 'pause',
},
{
duration: 600,
x: to.x,
y: to.y,
type: 'pointerMove',
origin: 'viewport',
},
{
button: 1,
type: 'pointerUp',
},
],
}]);
await this.browser.pause(1000);
}
Expand Down Expand Up @@ -1128,7 +1152,7 @@ class Appium extends Webdriver {
yoffset = 100;
}

return this.swipe(locator, 0, yoffset, speed);
return this.swipe(parseLocator.call(this, locator), 0, yoffset, speed);
}

/**
Expand Down

0 comments on commit 3b34ae6

Please sign in to comment.