Appium can launch an iOS app with an arbitrary language/locale by XCTest feature. The well known way is appium:language
and appium:locale
capabilities. The behind is simple. Appium provides -AppleLanguages
and -AppleLocale
process arguments to the launching process to the application under test.
It means you can launch an arbitrary application with an arbitrary language.
It is mobile: launchApp
command. For example, the below launches com.apple.Maps application as English environment. The process can launch as English environment even if the device under test was non-English environment.
driver.terminate_app "com.apple.Maps" driver.execute_script "mobile: launchApp", {bundleId: "com.apple.Maps", arguments: ["-AppleLanguages","(en)","-NSLanguages","(en)","-AppleLocale","en_US"]}
You should make sure the application process is stopped before starting it. The arguments work only when the process launches. It does not work when the process is running.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.