diff --git a/droidbot/adapter/droidbot_ime.py b/droidbot/adapter/droidbot_ime.py index 56a10c000..4e6fe250a 100644 --- a/droidbot/adapter/droidbot_ime.py +++ b/droidbot/adapter/droidbot_ime.py @@ -86,7 +86,8 @@ def input_text(self, text, mode=0): :param text: text to input, can be unicode format :param mode: 0 - set text; 1 - append text. """ - input_cmd = "am broadcast -a DROIDBOT_INPUT_TEXT --es text \"%s\" --ei mode %d" % (text, mode) + text_nospace = text.replace(' ', '--') + input_cmd = 'am broadcast -a DROIDBOT_INPUT_TEXT --es text %s --ei mode %d' % (text_nospace, mode) self.device.adb.shell(str(input_cmd)) diff --git a/droidbot/device_state.py b/droidbot/device_state.py index e2ff12c64..3fdd1eb71 100644 --- a/droidbot/device_state.py +++ b/droidbot/device_state.py @@ -445,7 +445,7 @@ def get_possible_input(self): for view_id in enabled_view_ids: if self.__safe_dict_get(self.views[view_id], 'editable'): - possible_events.append(SetTextEvent(view=self.views[view_id], text="HelloWorld")) + possible_events.append(SetTextEvent(view=self.views[view_id], text="Hello World")) touch_exclude_view_ids.add(view_id) # TODO figure out what event can be sent to editable views pass diff --git a/droidbot/resources/droidbotApp.apk b/droidbot/resources/droidbotApp.apk index 99769474e..c2a02698a 100644 Binary files a/droidbot/resources/droidbotApp.apk and b/droidbot/resources/droidbotApp.apk differ