Hi guys!
I’ve faced quite interesting issue.
I need to set quite long sleep during the test like over 1 hour long or get app to background.
The problem is whenever phone is locked (or simply screen get black) it is seems that there is no possibility to:
Unlock/Active the phone and run again (from last acitivity) app to foreground.
I have tried with Thread.sleep (yes I know it is not the best solution) and with moving app to background.
Result is always the same:
Moving app to background result:
driver.runAppInBackground(Duration.ofSeconds(x));
[debug] [ADB] Found package: ‘debug’ and fully qualified activity name : ‘com.app.activity’
[debug] [MJSONWP] Responding to client with driver.background() result: null
Sleep try:
Thread.sleep(x);
button.click();
[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
[debug] [UiAutomator] Moving to state ‘stopped’
[Logcat] Logcat terminated with code 0, signal null
[debug] [AndroidDriver] Shutting down Android driver
[Appium] Closing session, cause was ‘UiAUtomator shut down unexpectedly’
[Appium] Removing session ‘id’ from our master session list
Have You ever faced similar problem???