Ruby 葫芦ios旋转抛出启动程序/运行循环错误
我正在尝试使用旋转功能将应用程序带入横向视图。在控制台中工作正常,如:Ruby 葫芦ios旋转抛出启动程序/运行循环错误,ruby,calabash-ios,Ruby,Calabash Ios,我正在尝试使用旋转功能将应用程序带入横向视图。在控制台中工作正常,如: 旋转(:右) 旋转(:左) 轮换:对 旋转:左 它们工作正常,但只要我通过自定义步骤或原始步骤定义尝试它们,就会收到以下错误消息: 当前启动器必须处于活动状态并连接到run_循环(ArgumentError) 由于我找不到任何与错误消息或旋转命令相关的内容,我在这里询问是否有人知道如何解决此问题 编辑: Thx的建议,但是我已经使用以下命令来执行它: 设备_TARGET='iPhone 4s(9.1)'bundle ex
- 旋转(:右)
- 旋转(:左)
- 轮换:对
- 旋转:左
require 'calabash-cucumber/launcher'
require 'run_loop'
# You can find examples of more complicated launch hooks in these
# two repositories:
#
# https://github.com/calabash/ios-smoke-test-app/blob/master/CalSmokeApp/features/support/01_launch.rb
# https://github.com/calabash/ios-webview-test-app/blob/master/CalWebViewApp/features/support/01_launch.rb
module Calabash::Launcher
@@launcher = nil
def self.launcher
@@launcher ||= Calabash::Cucumber::Launcher.new
end
def self.launcher=(launcher)
@@launcher = launcher
end
end
Before('@reset_app_btw_scenarios') do
ENV['RESET_BETWEEN_SCENARIOS'] = '1'
start_test_server_in_background
end
要检查的一件事是使用bundle exec…运行控制台,检查它是否使用与自动测试相同的葫芦版本。(如果你还没有)你的01_launch.rb看起来像什么?我想你是想在应用程序被仪器控制之前进行旋转。