This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
2 / 3
Aug 2018

I am new to appium and trying to automate one android native app but currently I am blocked as I am not able to inspect back,Home,Active app button present at bottom of Android phone screen.

I googled a lot about it but everywhere I found use of method “pressKeyCode(int key)” but this method is currently deprecated
(https://appium.github.io/java-client/io/appium/java_client/android/nativekey/PressesKey.html5)

I tried new method pressKey(KeyEvent keyEvent) but still not working.

Request to please help or let me know any reference where I can get details regarding.

PFB part of code:

AndroidDriver driver;
driver=new AndroidDriver(new URL(“http://127.0.0.1:4723/wd/hub”), cap);

driver.pressKey(KeyEvent(KEYCODE_MENU))); // KEYCODE_MENU can not be resolved
driver.pressKey(withKey(AndroidKey.HOME)))); //The method home is undefined for the type AndroidKey.

  • created

    Aug '18
  • last reply

    Aug '18
  • 2

    replies

  • 408

    views

  • 2

    users

  • 3

    links