calabash - 获取NoMethodError : undefined method 'query' for main:Object error

标签 calabash

当我输入评论时

正在运行 irb...1.9.3p374 :001 > 查询(“标签”)

它抛出以下错误。 NoMethodError:main:Object 的未定义方法“查询” 来自(irb):1 来自/Users/.rvm/rubies/ruby-1.9.3-p374/bin/irb:16:in '

如何解决此错误?

最佳答案

听起来当您启动 irb 时,葫芦库尚未加载。假设您使用的是 iOS 版 Calabash:

require 'calabash-cucumber/operations'
include Calabash::Cucumber::Operations

关于calabash - 获取NoMethodError : undefined method 'query' for main:Object error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14501834/

相关文章:

android - 使用 calabash-android 获取元素的颜色

ios - iOS7 中 UIAlertView 的葫芦问题

calabash - 从 Rubymine 运行 Calabash Android

ios - 葫芦 iOS : how to get value using query command

ios - Calabash-iOS 无法找到 AutomationInstrument.bundle(运行时错误)

android - 在我非常简单的葫芦测试用例中不断出现错误 "HTTPClient::ReceiveTimeoutError"

android - calabash-android 新邮件按钮

android - Calabash Android循环通过ListView进行检查

android - Calabash Android 脚本停止

ios - 葫芦无法连接到模拟器