You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to calabash...@googlegroups.com
Hi, Can someone please help me how to touch Done button on android keyboard using calabash. I have tried KEYCODE events and "done" in console but it is not performing any action. Unable to close the keyboard by swiping the screen down. The only option for me is to tap on Done on the keyboard so that the keyboard disappears and I can access other elements on that screen.
Thanks
Grant
unread,
Jul 28, 2014, 12:55:53 PM7/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to calabash...@googlegroups.com
We did this:
# Maps a event string to the Key Event code listed below # # * Parameters: # key_event - event text to map to the key event code # # * Returns: # The Key Event Code for Android # or # The key_event parameter if event_text is not found in map def map_key_event(event_text)
case event_text when "Done" key_event = "KEYCODE_ENTER" when "Next" key_event = "KEYCODE_ENTER" else key_event = event_text end
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to calabash...@googlegroups.com
# Sends a Key Press Event via the Native Keyboard. # Key event can be a number or a defined string, # see above key event code mapping. # If an error occurs, an exception is raised with message. # # * Parameters: # key_event - the key event code or string # See above key event codes. # # * Returns: # nil or nothing def keyboard_enter_keyevent(key_event)
if key_event.present? key_event = map_key_event(key_event) input_command = "#{default_device.adb_command} shell input keyevent #{key_event}" raise "Could not send key Event #{key_event}" unless system(input_command) else raise "keyboard key event is empty" end end