calabash-ios rotate throws launcher/run_loop error

95 Views Asked by At

I'm trying to use the rotate funktion to bring the app into the landscape view. In the Console that works just fine like:

  • rotate(:right)
  • rotate(:left)
  • rotate :right
  • rotate :left

They work without a problem, however as soon as i try them through my custom step or the original step definition i get the following error message:

the current launcher must be active and be attached to a run_loop (ArgumentError)

Since i couldn't find anything regading the error message or the rotate command that would refer to this, i ask here if anyone knows how to solve this problem?

EDIT: Thx for the advice alannichols however i'm already using the following commands to execut it: DEVICE_TARGET='iPhone 4s (9.1)' bundle exec cucumber DEVICE_TARGET='iPhone 4s (9.1)' bundle exec calabash-ios console

I use the calabash version 0.17.1 and xcode 7.1

EDIT2: The content of my 01_launcher.rb is as follows:

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
0

There are 0 best solutions below