-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat: add isSettingsAppServiceRunningInForeground to check the settings' service existence better #715
Conversation
I figured out the root cause a bit more.
|
that's a great find. |
I also think it would make sense to move more javascript code into io.appium.settings package. We should not keep this logic in appium-adb and have it more abstract |
Will probably do it later myself |
Note for this. It looks like the simplest way was if
Ideally we want to get the list of |
Added tests. Maybe this is currently what we can do to ensure if io.appium.settings package is having a foreground service as the service |
checked the |
## [11.1.0](v11.0.9...v11.1.0) (2024-01-09) ### Features * add isSettingsAppServiceRunningInForeground to check the settings' service existence better ([#715](#715)) ([be0502e](be0502e))
🎉 This PR is included in version 11.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
It looks like a command below launches
io.appium.settings
process, which can be found by[debug] [ADB] Running '/Users/kazu/Library/Android/sdk/platform-tools/adb -P 5037 -s D0AA002182JC0202126 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
, but the app was not started in the background properly (no the app in the notification). It causes io.appium.settings process did not start properly situation, thus for exampledriver.location
to get the location/set location causes an error because theio.appium.settings
was not started properly withthis.startApp
.We must start the settings app forcefully once with
this.startApp
to start the settings app process properly.I also found
-g
option could launch the io.appium.settings app process on Android 11. I saw the behavior was not always, but actually occurred. Then,await this.processExists(SETTINGS_HELPER_ID)
skipped the io.appium.settings process withthis.startApp
while uia2 driver must have started the settings app withthis.startApp
to make the get location etc work properlyappium/appium-android-driver#895 is this PR's usage