gpt4 book ai didi

ios - Calabash - 无法测试触摸事件

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:36:18 26 4
gpt4 key购买 nike

我正在使用 Calabash 通过 UI 自动执行一些测试,但我遇到了一些问题。

我的步骤如下:Then I touch the "login" button .

当我运行 cucumber ,控制台抛出这个错误:

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

环境:

  • 葫芦 0.11.0
  • Xcode 6.3.2
  • iPhone 5(8.3 模拟器)

重现步骤:

  • 为 iPhone 5 8.3 模拟器构建应用
  • 执行:DEBUG=1 calabash-ios console
  • 执行:start_test_server_in_background
  • 执行:touch("button marked:'login'")

控制台跟踪:

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>'

可能与 Github 中已关闭的问题有关:https://github.com/calabash/calabash-ios/issues/600

有谁知道我该如何解决这个问题?

最佳答案

我解决了这个问题。

在模拟器中,我选择了Reset Content & Settings... 并且成功了。

感谢您的帮助! (@jmoody 和@Lasse)。

关于ios - Calabash - 无法测试触摸事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30361750/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com