Search code examples
iosautomated-testscalabashcalabash-ios

Calabash - can't test touch events


I'm using Calabash to automate some tests with the UI but I'm having some issues.

I have a step as follows: Then I touch the "login" button.

When I run cucumber, the console throws this error:

Could not parse response ''; the app has probably crashed (RuntimeError)

Environment:

  • Calabash 0.11.0
  • Xcode 6.3.2
  • iPhone 5 (8.3 Simulator)

Steps to reproduce:

  • Build app to iPhone 5 8.3 simulator
  • Execute: DEBUG=1 calabash-ios console
  • Execute: start_test_server_in_background
  • Execute: touch("button marked:'login'")

Console trace:

RuntimeError: Could not parse response ''; the app has probably crashed from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:33:in rescue in uia' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:30:in uia' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:454:in uia_handle_command' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/uia.rb:201:in uia_tap_offset' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/actions/instruments_actions.rb:93:in query_action' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/actions/instruments_actions.rb:15:in touch' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/core.rb:1166:in query_action_with_options' from /Users/felipepenariveros/.rvm/gems/ruby-2.0.0-p353/gems/calabash-cucumber-0.14.2/lib/calabash-cucumber/core.rb:177:in touch' from (irb):2 from /Users/felipepenariveros/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in <main>'

It might be related to this issue already closed in Github: https://github.com/calabash/calabash-ios/issues/600

Does anyone know how can I solve this?


Solution

  • I solved this issue.

    In the simulator, I chose Reset Content & Settings... and it worked.

    Thanks though for helping out! (@jmoody & @Lasse).