I am a beginner in Appium automation. The application I am testing, have this scenario where I need to tap on Search button from the native keyboard. I have tried with pressKeyCode method but get this error The method pressKeyCode(int) is undefined for the type WebElement
I am using the following Appium 1.4.16.1 with Java client 5.0.0-BETA8 Selenium 3.4.0
I don’t know what I am doing wrong. I have tried with earlier java client for appium as well but nothing have worked so far. Also, if there is a work around other than the pressKeyCode to do this?
I have tried both
Updated appium version to 1.6.5
Also tried with this piece of code, still getting the same error “The method pressKeyCode(int) is undefined for the type AndroidDriver”
Yes the code is working now. Thanks a ton for that but I am still unable to tap on the Search key. I have tried to tap on other keys and it works perfectly fine but it does not tap on the search key.
I have the same issue enter or search keys do not work on appium (Appium latest version, using real device)
driver.pressKeyCode(AndroidKeyCode.KEYCODE_ENTER);
I also tried keycode=66 that does not work either .