For the Next/Go/Done combination, I use
adb shell input keyevent 'KEYCODE_TAB'
http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_TAB710
Hope this helps
For the Next/Go/Done combination, I use
adb shell input keyevent 'KEYCODE_TAB'
http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_TAB710
Hope this helps
@rakesh Are you using below capability ?capabilities.setCapability("unicodeKeyboard", true);
If not can you try with this capability.
Hi,
capabilities.setCapability("unicodeKeyboard", true) did't worked for me
I asked my developer to add a lister called "OnKeyListener"
finally worked.....
refer to this https://discuss.appium.io/t/unable-to-tap-search-button-on-android-softkeyboard/1598/12
@praveentp009 explained in detail
thanks @praveen
Except what rakesh said in the above thread(as i cannot force developer to write extra code and developers are not accessible for me)
I tried all the ways specified in this thread, but didnt help. Can someone help me here?
element.sendKeys(strValue+"\n"); - entering the value but soon after navigating to home screen.
element.sendKeys(strValue);
String command = "adb -s input keyevent KEYCODE_SEARCH";
** try {**
** Process result = Runtime.getRuntime().exec(command);**
** } catch (IOException e) {**
** // TODO Auto-generated catch block**
** e.printStackTrace();**
** }**
enter the value but didnt click on Search button.
element.sendKeys(strValue);
driver.sendKeyEvent(AndroidKeyCode.ENTER);
Enter the value and bringing back to home screen.
Also tried with Keyevent codes 84 and 66, but didnt help.
Can someone let me know any other soluctions
@UD
have you been able to get this problem solved?
@UD the only workaround that I found is to use a third party keyboard (GO Keyboard works for me) and then send key event 66. Works as expected. Maybe if you reverse engineer GO Keyboard implementation you can get more insight on how to make it work without a third party keyboard. Cheers!
driver.pressKeyCode(66);
//This is to press "Enter" from keyboard
https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_TAB417
The driver.pressKeyCode(66);
method doesn't work for me. The only other solution I have seen is to tap the button based on coordinates. Although it would work it would be awful when trying to support multiple devices.
Has there been any progress on this topic? This feature is fairly critical for the work that I am doing. If anyone has a solution to this it would be greatly appreciated.
On using ((AndroidDriver) driver).pressKey(new KeyEvent(AndroidKey.ENTER));
pressKey gives error:
The method pressKey(io.appium.java_client.android.nativekey.KeyEvent) in the type PressesKey is not applicable for the arguments (java.awt.event.KeyEvent)
2 quick fixes available:
Change to longPressKey()
Change to pressKeyCode()
(new KeyEvent(AndroidKey.ENTER) gives error: The constructor KeyEvent(AndroidKey) is undefined
KeyEvent is striked.
On changing pressKey to pressKeyCode, I’m getting error: The method pressKeyCode(int) in the type PressesKey is not applicable for the arguments (KeyEvent)