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
  • 1
    Please post the code that returned the error that you have described.
    – return
    Commented Apr 17, 2018 at 19:55

1 Answer 1

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 and acknowledge you have read our privacy policy.

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