Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reopen the app after run the app in the background in the BrowserStack using Patrol pressHome function #2525

Open
AntoniKwok opened this issue Feb 12, 2025 · 6 comments
Assignees

Comments

@AntoniKwok
Copy link

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)

@fylyppo
Copy link
Collaborator

fylyppo commented Feb 12, 2025

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();

@fylyppo fylyppo self-assigned this Feb 12, 2025
@fylyppo fylyppo added the waiting for response Waiting for user's response label Feb 12, 2025
@AntoniKwok
Copy link
Author

Hi @fylyppo , does this mean we can't simulate run app in the background on iOS in BrowserStack?

@github-actions github-actions bot removed the waiting for response Waiting for user's response label Feb 13, 2025
@fylyppo
Copy link
Collaborator

fylyppo commented Feb 13, 2025

@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

@valtbarbos
Copy link

@AntoniKwok , take a look at this case: https://github.com/leancodepl/patrol/issues/2382

@AntoniKwok
Copy link
Author

@valtbarbos , I can't open the issue

@AntoniKwok
Copy link
Author

I just use this methods

await $.native.pressHome();
await $.native.openApp();

but it's not working on iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants