Join Slack
Powered by
Have any of you ever changed the language in runti...
# android
d
dave
03/05/2019, 3:34 PM
Have any of you ever changed the language in runtime while running espresso tests? We are trying to automate the screenshot generation for our app in all the available languages, yet local changes are not reflected in the UI. Ideas?
j
Jiddles
03/05/2019, 3:58 PM
Have you had a look at this article ?
https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758
😎 2
b
Bino
03/05/2019, 8:18 PM
It is currently (android >= 26) not possible. Try this
https://github.com/thebino/SampleProject/blob/master/android/app/src/androidTest/java/com/example/util/LocaleRule.kt
d
dave
03/06/2019, 9:10 AM
Hi guys, thanks, tried both but no luck. It's impressive how this turned to be difficult to achieve 😞
dave
03/06/2019, 9:26 AM
Actually the only reliable and working way I found:
https://play.google.com/store/apps/details?id=net.sanapeli.adbchangelanguage&hl=en_US
dave
03/06/2019, 9:27 AM
with it I can mix my Espresso tests with adb scripts and get all possible languages 🙂
b
Bino
03/06/2019, 10:06 AM
You asked for a solution from your espresso tests not for adb commands 😄
😎 1
d
dave
03/08/2019, 10:13 AM
yes, yet, from espresso it never worked, thanks anyway
Open in Slack
Previous
Next