The command perform_action('send_key_enter')
sends the enter key but for our search field, the enter key is replaced by the search key in the Android keyboard.
Is there a special perform_action
command to send the input of the search key?
The command perform_action('send_key_enter')
sends the enter key but for our search field, the enter key is replaced by the search key in the Android keyboard.
Is there a special perform_action
command to send the input of the search key?
What could be happening is your scripts aren't able to accurately locate ADB in order to send the command to the device. Try using the following, which uses default_device.adb_command - this should use the full path to ADB and also use the proper device id:
system("#{default_device.adb_command} shell input keyevent KEYCODE_ENTER")
Also, I can't take credit for this, so go ahead and take a look at this great post which helped me immensely when dealing with entering text:
I have been able to solve this by the following command: press_user_action_button('search')
Source: https://groups.google.com/d/msg/calabash-android/Tl14BqQeWoU/zlxm3hRIpsQJ as part of the v0.5.2
release notes.
Try this : system("adb shell input keyevent KEYCODE_ENTER")
By 'adb shell input keyevent', either an event_code or a string will be sent to the device.
Please mention your error message if you still face same issue