UI Testing localized applications

Hi,

my app Well Tempered is localized into multiple languages, and I want to make UI tests that work in all languages.


First off, how do I set my app to launch in Spanish? I tried combinations of

app.launchArguments = ["-AppleLanguages", "es"]

without much luck.


Secondly, of course all my accessibility labels are localized. Should I create localization ids and use them, or should I use the same .strings files as in my app and use NSLocalizedString everywhere where the examples have shown strings?


Thirdly, when I launch my app I can provide a directory of Application Data. How do I do this for UI tests, and how do I choose a set of application data per language?


Cheers


Nik

Try this:
app.launchArguments = ["-AppleLanguages \"(es)\""]

I managed to set it by setting only


-AppleLanguages (es)


Thanks :-)

did you ever figure out the other questions?

This is how you do it


app.launchArguments = ["-AppleLanguages", "(es)"]
UI Testing localized applications
 
 
Q