To press search on keyboard in appium


#1

I am unable to click on search button on my keyboard.I have tried several keyevents but not yet successful.so anyone suggest please


#2

have you tried this?

press_keycode 84

http://developer.android.com/reference/android/view/KeyEvent.html

public static final int KEYCODE_SEARCH

Added in API level 1
Key code constant: Search key.

Constant Value: 84 (0x00000054)

Also, you can dig into appium lib for more info
http://www.rubydoc.info/github/appium/ruby_lib/Appium/Device:press_keycode

hope it helps
Eric


#3

I have already tried this but unable to perform.


#4

Hi,

Try with the following, Hope this helps…
adb -s input keyevent KEYCODE_SEARCH

Thanks,
BHaskar.


#5

same here, tried 84, but as I understand this is not what I’m looking for.
the possible thing is https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_SEARCH
but I have no idea how to use it instead of key events from here https://developer.android.com/reference/android/view/KeyEvent.html


#6

Check Unable to execute search – Appium Ruby 1.9.0