Long press touch action is no longer working for iOS in 1.8.0
See original GitHub issueThe problem
Long press TouchAction method is not recognized as long press in iOS when moving up to Appium 1.8.0. If I use Appium 1.7.2, the long press method works as expected.
Environment
- Appium version (or git revision) that exhibits the issue: 1.8.0 (Appium Desktop 1.6.1)
- Last Appium version that did not exhibit the issue (if applicable): 1.7.2 (Appium Desktop 1.5.0)
- Desktop OS/version used to run Appium: Mac (10.13.3), Ruby 2.5.1 (Ruby Gems: appium_console (2.8.1), appium_lib (9.12.0), appium_lib_core (1.5.0)
- Mobile platform/version under test: Xcode 9.2 (11.2)
- Real device or emulator/simulator: Simulator
- Appium CLI or Appium.app|exe: Appium.app
Details
It seems like something has changed with the long press method, which has caused it to not be recognized as a long press in iOS. Executing the following commands in Appium Ruby Console, I got unexpected results when calling long_press()
in Appium 1.8.0.
Command | 1.7.2 gesture recognized | 1.8.0 gesture recognized | result |
---|---|---|---|
Appium::TouchAction.new.press(x:200,y:100).release.perform |
tap | tap | pass |
Appium::TouchAction.new.long_press(x:200,y:100).release.perform |
long press | tap | fail |
Appium::TouchAction.new.press(x:200,y:100).wait(500).release.perform |
tap | tap | pass |
Appium::TouchAction.new.press(x:200,y:100).wait(501).release.perform |
long press | long press | pass |
Link to Appium logs
Will add if needed
Code To Reproduce Issue
https://github.com/JoelWhitney/sample-appium-test/tree/touch-action-bug
Steps To Reproduce Issue
- Clone
sample-appium-test
- In Appium Desktop 1.6.1, start Server 1.8.0
- Open Terminal at
sample-appium-test
directory - Start Appium Ruby Console, via
arc
command - Execute
Appium::TouchAction.new.long_press(x:200,y:100).release.perform
command - Notice UILabel says
Tap occurred
instead ofLong press occurred
- Execute
Appium::TouchAction.new.press(x:200,y:100).wait(500).release.perform
command - Notice UILabel says
Long press occurred
as expected - In Appium Desktop 1.5.0, start server 1.7.2
- Repeat steps 5-8 and notice long press behaves as expected
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
iOS + appium java client: Long press TouchAction does not ...
I am trying to automate long press touch action in a native iOS app. Approach1: to simulate long press in top left corner...
Read more >appium/java-client - Gitter
I am trying to automate my iOS app where I need to inspect one of the webview ... The method longPress(LongPressOptions) in the...
Read more >Longpress is not working in iPhone devices - Appium Discuss
I have used below code to press long press. It is working and thrown exception. webElement = driver.findElementByAccessibilityId(“Sign Up ...
Read more >Maps SDK for iOS release notes - Google Developers
5 and lower will no longer work after those versions are decommissioned. To avoid disruption for your users, build new versions of your...
Read more >UniFi Protect iOS 1.8.0 - Ubiquiti Community
Also, all of the cameras show "Excellent" when they are in fact wired devices, not WiFi devices. In the Network app, they show...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
since 1.8.0 touch action handler has been completely rewritten, so it is now using the “fair” XCTest implementation under the hood. Previously we were trying to match a limited set of action chains that were similar to the available XCUIElement method calls.
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.