Ruby 卡拉巴斯iOS:每次断言失败时都会遇到堆栈级别太深(SystemStackError)错误

Ruby 卡拉巴斯iOS:每次断言失败时都会遇到堆栈级别太深(SystemStackError)错误,ruby,calabash,calabash-ios,Ruby,Calabash,Calabash Ios,每次断言失败时,我都会遇到“stack level too deep(SystemStackError)”错误,不管实际的:timeout_消息是什么 以下代码示例只是每次断言失败时出现上述错误的众多示例中的两个: def wait_and_touch(element) when_element_exists(element, :timeout => 10, :timeout_message => "[#{element}] element was not identifi

每次断言失败时,我都会遇到“stack level too deep(SystemStackError)”错误,不管实际的:timeout_消息是什么

以下代码示例只是每次断言失败时出现上述错误的众多示例中的两个:

 def wait_and_touch(element)
    when_element_exists(element, :timeout => 10, :timeout_message => "[#{element}] element was not identified")
  end

  def check_user_message(usr)
    usr_array = usr.gsub(",", " ").split
    usr_array.each do |item|
      f_name = @test_data.get_first_name(item)
      wait_for(:timeout => 5, :timeout_message => "[FAIL] The message from #{f_name} should be displayed as unread!") {
        query(panel_1_msg_cell + " descendant view {text CONTAINS '#{f_name}'}", :font).first.include? 'Roboto-Black' }
    end
  end
我目前正在使用葫芦-V0.20.0版本和ruby-2.3.1[x86_64],OS X El Capitan,-V10.11.6

知道为什么会这样吗


谢谢

我想你是在某处打电话给
include Calabash::Cucumber::Operations
。您不需要
在代码中的任何位置包含
操作。

请提供堆栈跟踪或只是其中的一个片段。我认为溢出是由于
embed
方法被调用的次数太多。更新:@jmoody,你是对的,通过从一些页面中删除
include-Calabash::Cucumber::Operations
,错误不再发生。非常感谢,它真的帮助了我。