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.

IOS - TouchAction function doesn't work

See original GitHub issue

The problem

I’m working with the java-client and an iOs real device. My goal is to click on a offset of a MobileElement. After I saw that driver.tap was deprecated, I tried to use IOSTouchAction but it doesn’t work. I think myMobileElement.click() and new IOSTouchAction(myDriver).tap(myMobileElement) should do the same but only the first one works.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.5-beta
  • Desktop OS/version used to run Appium: Mac OS 10
  • Node.js version (unless using Appium.app|exe): 3.10.10
  • Mobile platform/version under test: iOS 9.3.5
  • Real device or emulator/simulator: iPhone 6 plus

Details

  • First method with mobileElement.click works:
MobileElement beforeLastBubble= roomPageA.bubblesList.get(roomPageA.bubblesList.size()-2);
beforeLastBubble.click();

Appium server logs are: https://gist.github.com/jeangb/24ba085e2c8f686cc78e684d2b76f636

  • Second method with TouchAction doesn’t work: new IOSTouchAction(myDriver).tap(beforeLastBubble); (The driver used to instanciate the IOSTouchAction is the same used to create my MobileElement object) Appium server logs returns

[MJSONWP] Responding to client with driver.performTouch() result: null

Full logs here: https://gist.github.com/jeangb/ce8b48fd65180a2c208f26d10f447f2d

For me the second method is the equivalent of the first one, why it doesn’t work ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, May 5, 2017

@jeangb you are possibly missing perform call, which is mandatory to apply the action.

0reactions
lock[bot]commented, Apr 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 11.4 Safari not respecting 'touch-action: manipulation'
iOS Safari supports touch-action: manipulation and touch-action: auto , but I found a bug, that it doesn't work for inputs - they're zooming ......
Read more >
TouchAction for swipe is not working in iOS - Appium Discuss
Hi, I am using below code the perform vertical swipe on the screen, but the swipe action is not performing: Dimension size =...
Read more >
Adjust how iPad responds to your touch - Apple Support
Go to Settings > Accessibility > Touch > Haptic Touch. Choose the touch duration—Fast or Slow. Test your new settings on the image...
Read more >
touch-action - CSS: Cascading Style Sheets - MDN Web Docs
Applications using Touch events disable the browser handling of gestures by calling preventDefault() , but should also use touch-action to ...
Read more >
How to Use Touch Actions in Appium: Swipe Tap Touch
hi sir. how to perform the below tap by co-ordinates using appium ios device. //Tap by coordinates public void tapByCoordinates (int x, int...
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