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

Fix opening settings app with clean state on iOS #2275

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

piotruela
Copy link
Collaborator

@piotruela piotruela commented Jul 22, 2024

Closes #2273.
Seems like XCUIApplication launch method is not working as it is described in the documentation:

Launches the application synchronously. On return the application ready to handle events. If the application is already running, the existing instance will be terminated to ensure a clean state for the launched instance.

What is even more strange, adding self.preferences.activate() before self.preferences.launch() fixes the issue. The flow looks kind of glitchy (settings app is opened twice in a row), but the whole flow completes successfully.

Here's a recording of how it looks after the change:

Screen.Recording.2024-07-24.at.10.25.13.mov

@github-actions github-actions bot added the package: patrol Related to the patrol package (native automation, test bundling) label Jul 22, 2024
@pdenert
Copy link
Collaborator

pdenert commented Jul 23, 2024

Please add in PR description fix #2273 and update changelog

Copy link
Collaborator

@pdenert pdenert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@piotruela piotruela merged commit ea94465 into master Jul 25, 2024
11 of 17 checks passed
@piotruela piotruela deleted the fix/opening-settings branch July 25, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: patrol Related to the patrol package (native automation, test bundling)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NativeAutomator.disableDarkMode does not work if Settings App is not in Default View on iOS
2 participants