Detox
Detox copied to clipboard
Add ability to change language for Android
Describe your idea
Following up on https://github.com/wix/Detox/issues/683 and https://github.com/wix/Detox/pull/873 which implemented the ability to change language between tests on iOS.
Would be great to have the same functionality also on Android.
My use cases:
- testing i18n
- making screenshots for stores
@jonathanmos could you comment on this, please?
I don't know whether we will have the capacity to implement this in the near future, but it looks like it could be done with an api to the emulator cmdline flags without requiring superuser (although only on 29+)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this reporsitory, read this discussion.
It looks like this will require a new resolver for the avd version + whether it's a playstore image. We also need to check how it would affect the flow given that changing the language this way restarts the avd.
@jonathanmos looks like we don't have the capacity for this. Could you be kind to sum up what you think the solution should be like, so we could put this at the community's doorstep?
There is an api for api >= 29 to change the device language e.g. emulator -avd <avd-name> -change-language es
. To expose this api we would need first to validate that the emulator is indeed running api >= 29 and that the image is not from the playstore, and at the moment we don't have such a resolver.