This is my scenario
How to achieve this?
I have tried the following methods
resetApp()
- it uninstall the app and install app again. closeApp()
- it just close the app but app is still running in the background. adb shell am force-stop <packagename>
- it just close the app but app is still running in the background. But for my scenario it should delete from the background and app should not uninstall in Android in the same test (middle of the test).
You can try it, I think it will serve your purpose, use below line from where you want to launch the app again
Activity activity = new Activity("appPackage", "appActivity");
driver.startActivity(activity);
Try below code and add this to the capability :
capabilities.setCapability(MobileCapabilityType.NO_RESET,"false");
It should work as per your requirements.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.