gpt4 book ai didi

android - 葫芦-android : `Cucumber::Ast` no longer exists

转载 作者:太空宇宙 更新时间:2023-11-03 12:07:15 28 4
gpt4 key购买 nike

我从 calabash 开始,但无法运行测试。测试很简单,按一个TextView即可:

Feature: Login feature
Scenario: Given I am on the Login page
touch("TextView id:'com.tae.store:id/option_bag'")

但我总是有同样的错误:

功能:登录功能

  Scenario: Given I am on the Login page # features/my_first.feature:3
touch("TextView id:'com.tae.store:id/option_bag'")
`Cucumber::Ast` no longer exists. These classes have moved into the `Cucumber::Core::Ast` namespace, but may not have the same API. (RuntimeError)
./features/support/app_installation_hooks.rb:8:in `Before'

Failing Scenarios:
cucumber features/my_first.feature:3 # Scenario: Given I am on the Login page

1 scenario (1 failed)
0 steps
0m6.173s

我正在使用 Ruby 1.9.3(我也尝试过使用 Ruby 2.0.0)。

谢谢

最佳答案

我在尝试设置 Calabash 和 Cucumber 时遇到过几次这个问题。我发现问题与我使用的 Cucumber gem 的版本有关。几个不同的消息来源提到较新的 Calabash gems 不适用于 beta Cucumber 版本(引用:https://github.com/calabash/calabash-android/issues/479)

为了解决这个问题,我安装了一个较旧的 cucumber gem 并删除了较新的 gem

gem install cucumber -v 1.3.17
gem uninstall cucumber -v 2.0.0.beta.3

这样做之后,我能够运行我的测试而不会弹出错误。希望这对其他人也有帮助。

关于android - 葫芦-android : `Cucumber::Ast` no longer exists,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26364840/

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