【问题标题】:Calabash-iOS : stack level too deep (SystemStackError) error is encountered each time an assertion is failingCalabash-iOS:每次断言失败时都会遇到堆栈级别太深(SystemStackError)错误
【发布时间】:2017-02-28 18:21:40
【问题描述】:

每次断言失败时,我都会遇到“堆栈级别太深(SystemStackError)”错误,无论实际是什么:timeout_message

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

 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

我目前正在使用 ruby​​-2.3.1 [ x86_64 ]、OS X El Capitan、-v 10.11.6 的葫芦 -v 0.20.0 版本

知道为什么会这样吗?

谢谢

【问题讨论】:

  • 请提供堆栈跟踪或仅提供一个的 sn-p。我认为溢出是由于embed方法被调用太多次。

标签: ruby calabash calabash-ios


【解决方案1】:

我相信你在某个地方打电话给include Calabash::Cucumber::Operations。您不需要在代码中的任何位置进行include 操作。

【讨论】:

  • 更新:@jmoody,你是对的,通过从某些页面中删除 include Calabash::Cucumber::Operations,错误不再发生。非常感谢,对我很有帮助。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-10
  • 2013-10-05
  • 2014-10-25
  • 2017-08-19
  • 1970-01-01
相关资源
最近更新 更多