Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Apr 11, 2018 17:04

What are language and region settings and why is it important?

See apple documentation.

How we used to do it?

Traditionally, to test an application under customized language and region settings, you would need to perform manipulations of the device Settings application to traverse the different screens and select the correct language and region setting.

This created a lot of overhead for the tester.

  • Changing the device language/region cannot be automated.
  • Doing it manually takes time.
  • Test suites needed to be separated for each different language-region combination. 

What's new?

Apple provided a way for developers to run XCUITest while the tested application acts like the device is set to customize language and region.

How to use it?

When creating an automation script in Appium for an iOS device that runs the XCUITest Framework, all you need to do is to set the following capabilities, language and locale, as part of the DesiredCapabilities object passed to the driver. Both language and locale expect a ‘locale identifier’ as a value.

capabilities.setCapability("language", "es"); // language is Spanish
capabilities.setCapability("locale", "es_UY"); // region is Spanish (Uruguay)


Keep in mind, these capabilities only affect the tested application and not the actual device setting or any other app (the tested application is the one specified by the bundleId capability).

Note: Supported from Perfecto Lab Release 18.2