lib/calabash-cucumber/keyboard_helpers.rb in calabash-cucumber-0.9.167 vs lib/calabash-cucumber/keyboard_helpers.rb in calabash-cucumber-0.9.168.pre4
- old
+ new
@@ -276,9 +276,10 @@
# raises an error if the text cannot be entered
def keyboard_enter_text(text)
_ensure_can_enter_text
if uia_available?
text_before = _text_from_first_responder()
+ text_before = text_before.gsub("\n","\\n") if text_before
uia_type_string(text, text_before)
else
text.each_char do |ch|
begin
keyboard_enter_char(ch, {:should_screenshot => false})