lib/calabash-cucumber/keyboard_helpers.rb in calabash-cucumber-0.10.2 vs lib/calabash-cucumber/keyboard_helpers.rb in calabash-cucumber-0.11.0

- old
+ new

@@ -384,10 +384,15 @@ # do not have an action key. # # @raise [RuntimeError] if the text cannot be typed. def tap_keyboard_action_key if uia_available? - uia_type_string '\n', '', false + run_loop = Calabash::Cucumber::Launcher.launcher.run_loop + if run_loop[:uia_strategy] == :host + uia_type_string "\\\\n", '', false + else + uia_type_string '\n', '', false + end else keyboard_enter_char 'Return' end end