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.
driver.pressKeyCode(AndroidKeyCode.BACK);
It worked perfect! Thank you!
For future reference, I look at the source code on github
https://github.com/appium/java-client
After that, I ust searched through the repo for "back"
working thanks…
driver.navigate().back();
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;