question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

duration of swipe is not configurable, resulting in missing swipes

See original GitHub issue

I was trying to perform a swipe action of 2 sec long using below client call: Appium::TouchAction.new.swipe(start_x: 200, start_y: 600, end_x: 200, end_y:300, duration:2000).perform

However, the duration was not taken into account and it was a superfast swipe which is being considered as flick and not swipe.

2018-12-12 22:03:44:143 - [HTTP] --> POST /wd/hub/session/1bd51e9a-0eec-4134-8122-529d4c4e9294/touch/perform
2018-12-12 22:03:44:143 - [HTTP] {"actions":[{"action":"press","options":{"x":200,"y":600}},{"action":"wait","options":{"ms":2000}},{"action":"moveTo","options":{"x":200,"y":300}},{"action":"release"}]}
2018-12-12 22:03:44:144 - [W3C (1bd51e9a)] Driver proxy active, passing request on via HTTP proxy
2018-12-12 22:03:44:146 - [debug] [JSONWP Proxy] Matched '/wd/hub/session/1bd51e9a-0eec-4134-8122-529d4c4e9294/touch/perform' to command name 'performTouch'
2018-12-12 22:03:44:146 - [debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/1bd51e9a-0eec-4134-8122-529d4c4e9294/touch/perform] to [POST http://localhost:4567/session/670aa713-edc6-4f1f-b5a9-e3c61757e6bc/touch/perform] with body: {"actions":[{"action":"press","options":{"x":200,"y":600}},{"action":"wait","options":{"ms":2000}},{"action":"moveTo","options":{"x":200,"y":300}},{"action":"release"}]}
2018-12-12 22:03:44:556 - [debug] [JSONWP Proxy] Got response with status 200: {"id":"37973cd4-124d-4c70-b363-6d48f426b707","sessionId":"670aa713-edc6-4f1f-b5a9-e3c61757e6bc","status":0,"value":null}
2018-12-12 22:03:44:556 - [JSONWP Proxy] Replacing sessionId 670aa713-edc6-4f1f-b5a9-e3c61757e6bc with 1bd51e9a-0eec-4134-8122-529d4c4e9294
2018-12-12 22:03:44:557 - [HTTP] <-- POST /wd/hub/session/1bd51e9a-0eec-4134-8122-529d4c4e9294/touch/perform 200 414 ms - 120
2018-12-12 22:03:44:557 - [HTTP]

On client side, even if I add duration in {“action”:“moveTo”,“options”:{“x”:200,“y”:300}} , on server side there is no duration attribute in TouchActionOptions

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rajdeepvcommented, Dec 14, 2018

Thanks @KazuCocoa

1reaction
KazuCocoacommented, Dec 14, 2018

Currently, I have no concrete plan to wrap W3C actions over Appium::Core::TouchAction since we can call like below as same as selenium-webdriver. https://github.com/appium/ruby_lib_core/blob/a549a8ab1977e86bc29533a829cd9bc69067d24e/test/functional/ios/webdriver/w3c_actions_test.rb#L17

https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/TouchAction

Consider to use W3C spec touch action like the followings.

(Or I’ll just insert warning message in TouchAction in ruby_lib)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swipe gestures for DELETE in iPad OS Mail - Apple Community
Swipe gestures for DELETE in iPad OS Mail. I am having a hard time understanding why the Trash or Delete option is not...
Read more >
Apple Watch swipe up to access Control center or notifications ...
Many Apple Watch users are facing a bug where the swipe up gesture (to access Control Center or notifications) is not working correctly....
Read more >
How do I Disable the swipe gesture of UIPageViewController?
The documented way to prevent the UIPageViewController from scrolling is to not assign the dataSource property. If you assign the data ...
Read more >
10 Ways to Fix iPhone Swipe Up Not Working - iMobie
Swipe up stopped working on your iPhone? ... that can fix iPhone/iPad system problems and avoid iPhone swiping up to unlock not working....
Read more >
How to Use Touch Actions in Appium: Swipe Tap Touch
Press by using an element and duration (in seconds); Press by using x,y coordinates, and duration (in seconds); Horizontal swipe by using the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found