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.
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
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;
Yes. this worked perfectly for me. the earlier one showed as a deprecated one.
Thanks for the help.
Its not working for me .
i m getting this error
The method presskeycode(int)is undefined for the type AppiumDriver<capture#19-of?>
Thank you, It works for me
is there any other way(W3C) apart from driver.navigate().back(); after upgrading to appium java client version 8.2.0 to tap on Android back button using AppiumDriver