This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 8
Oct 2015

I can't seem to find the code that works yet. Anyone, can you share Click back button on android device in Java code that works?

Thanks in advance.

  • created

    Oct '15
  • last reply

    Oct '18
  • 7

    replies

  • 14.4k

    views

  • 6

    users

  • 10

    likes

  • 1

    link

2 years later

working thanks…

6 months later

While the keycode was deprecated. this worked for me. Thanks

Use
driver.pressKey(new KeyEvent(AndroidKey.BACK));

Imports
import io.appium.java_client.android.nativekey.AndroidKey;
import io.appium.java_client.android.nativekey.KeyEvent;