Can't reopen the app after run the app in the background in the BrowserStack using Patrol pressHome function
Hi Patrol Team, when I use pressHome() function from native interaction, the test will be stopped once I reopen the test (the previous will be stopped and it will rerun the same test case again)
Hi, on iOS automation is blocked after moving app to background (probably because of security reasons). Regarding Android, could you try to create a test file with steps similar to snippet below?
await $.pumpWidget(yourApp);
await $.native.pressHome();
await $.native.openApp();
await Future<void>.delayed(const Duration(seconds: 5));
await $(someWidget).waitUntilVisible();
Hi @fylyppo , does this mean we can't simulate run app in the background on iOS in BrowserStack?
@AntoniKwok it's possible to move app to background for IIRC max 2 seconds, within this time you need to move app again to foreground so as to be not blocked by BS
@AntoniKwok , take a look at this case: #2382
@valtbarbos , I can't open the issue
I just use this methods
await $.native.pressHome(); await $.native.openApp();
but it's not working on iOS
@AntoniKwok is there any exception thrown or patrol says that steps are completed but nothing is visible on the screen? Could you provide your device logs here and device and OS combination?
FYI @fylyppo IDK how it goes in BS (tests running on Android emulator?) - but in my case I faced "test stuck" on Android emulator during native actions (pressHome, openApp) as on our GitLab runner (own MacMini) and locally (I'm using Mac). Seems like the root cause is the latest emulator version Android Emulator (35.3.12) Stable. So I switched back to Android Emulator (35.3.11) Stable - no such problems so far.