I have been working with UI test on iOS, and using XCUITest on swift. In one test I need to tap with two fingers on the screen at the same time. I used twoFingerTap()
. The test passes when I run it from Xcode. But running by command line with fastlane it fails. Then, a coworker suggested to change it to tap(withNumberOfTaps:1 numberOfTouches:2)
, and it works when running on both ways. I have no idea why this different behavior from actions that should be doing the same thing. Somebody knows?
First attempt:
appUnderTest.twoFingerTap()
Second attempt:
appUnderTest.tap(withNumberOfTaps: 1, numberOfTouches: 2)
Fastlane Command:
bundle exec fastlane scan --scheme "MyApp" --device "iPhone 13" --force_quit_simulator --prelaunch_simulator --reset_simulator