2

Calabash-ios tests involving a single tap have started to fail, with multiple taps being received where only one should happen.

I'm running tests against the simulator "iPhone 5s (8.2 Simulator)" and I've tried various Calabash tapping methods, include tap_mark, touch and for example:

wait_tap view_selector

which generates a single http call (using Wireshark to sniff):

http://localhost:37265/uia-tap

but is causing multiple taps in the simulator, which can be seen from the simulator Console log:

Mar 31 13:28:38 mc-x.local MyApp[13790]: NSUserDefaults path = /PathToPrefs/myApp.plist
Mar 31 13:28:38 mc-x.local MyApp[13790]: Current request: {
    command = "uia.tapOffset('{:x 160.000000, :y 332.000000}')";
    index = 0;
}

and these two lines are repeated identically (same timestamp) - once, twice or three times more, giving repeated identical uia.tapOffset events.

I'm using Xcode 6.2 build 6C131e with Calabash 0.13.0. The failures started after I upgraded from 0.11.4, though I've also upgraded from Xcode 6.1.1 to 6.2 so I'm not sure which is responsible.

Has anyone come across something similar? Any suggestions?

MikePosh
  • 21
  • 2
  • Hi Mike, Does this happen on devices as well? Is it reproducible always? Can you share an example project? – jmoody Apr 02 '15 at 08:59
  • Hi Joshua, thanks for responding. I haven't tried this on a device - I will give it a go today. It seems to be reproducible to the extent of at least two taps occurring, but sometimes there are more. I can also try to put an example project together (though maybe not immediately) - how would I share that with you? – MikePosh Apr 02 '15 at 12:40
  • I am a Calabash iOS Toolchain maintainer. You can contact me via the email found on my GitHub profile. https://github.com/jmoody – jmoody Apr 02 '15 at 16:00
  • I did try running on device iPhone 5S (iOS 8.1) but hit the following error: Apr 2 18:10:42 XXX-iPhone-5s MobileGestaltHelper[81] : libMobileGestalt MobileGestalt.c:273: server_access_check denied access to question UniqueDeviceID for pid 245 Apr 2 18:10:42 XXX-iPhone-5s ScriptAgent[245] : libMobileGestalt MobileGestaltSupport.m:170: pid 245 (ScriptAgent) does not have sandbox access for re6Zb+zwFKJNlkQTUeT+/w and IS NOT appropriately entitled – MikePosh Apr 02 '15 at 17:08
  • I've created a sample project from scratch, added the Calabash framework and a simple scenario to tap a button. Joshua, I have sent you a link. The button only recognizes a single tap, but the console log shows 6 identical uia.tapOffset commands being applied. The view I have the problem with is a normal view with a UITapGestureRecognizer attached. – MikePosh Apr 02 '15 at 17:23
  • The error you mention is a known in Apple's ScriptAgent. It was introduced in Xcode 6/iOS 8. I usually recommend a device restart, but these days it seems to have no effect on the success or failure of Calabash tests. – jmoody Apr 02 '15 at 17:45
  • Thanks, Joshua. Do you have any link to a discussion of that bug? Are there any workarounds? – MikePosh Apr 15 '15 at 14:49
  • Hey http://stackoverflow.com/users/4738625/mikeposh I am just back from a long vacation. I have lost the email you sent me. I just came across some similar behavior and we recently made a PR on the server to address an edge case where this was happening. Can you resend the email to me? There are no workarounds for the ScriptAgent crash. Apple knows about it. – jmoody May 01 '15 at 13:29

0 Answers0