0

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 getting this error-

The method pressKeyCode(int) is undefined for the type WebElement

I am using the following Environment-

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 has worked so far. Also, is there any workaround other than the pressKeyCode to do this?

  • 1
    Please post the code that returned the error that you have described. – return Apr 17 '18 at 19:55
0

You can try it: ((AndroidDriver)driver).pressKeyCode(84);

For details about android keyevent: KeyEvent

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.