diff --git a/docs/dev/test-configuration-options.md b/docs/dev/test-configuration-options.md index 71fc7413b8..a520b87739 100644 --- a/docs/dev/test-configuration-options.md +++ b/docs/dev/test-configuration-options.md @@ -843,6 +843,63 @@ Using Appium 2? Prevent `appium:`-prefix repetitiveness and start using [`appium --- +### `appium:timeZone` + +
| OPTIONAL | BOOLEAN | Virtual and Real Devices | Android Only |
+ +Overrides the current device's time zone. This change is done on per-device basis and is +preserved for the whole duration of the test session. The time zone identifier must be a +valid name from [the list of available time zone identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), +for example `Europe/Paris`. + +:::note +The iOS equivalent is [`appium:appTimeZone`](#appiumapptimezone). +::: + +:::note +This capability is only supported since UiAutomator2 driver version 3.1.0. +::: + +```java +MutableCapabilities capabilities = new MutableCapabilities(); +capabilities.setCapability("appium:timeZone", "Europe/Paris"); +``` + +:::tip +Using Appium 2? Prevent `appium:`-prefix repetitiveness and start using [`appium:options`](#appiumoptions) for Real Devices instead. +::: + +--- + +### `appium:appTimeZone` + +| OPTIONAL | BOOLEAN | Virtual and Real Devices | iOS Only |
+ +Defines the custom time zone override for the application under test. +You can use `UTC`, `PST`, `EST`, as well as place-based timezone names such as `America/Los_Angeles`. +See [the list of available time zone identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) f +or more details. The same behavior could be achieved by providing a custom +value to the `TZ` environment variable via the `appium:processArguments` capability. + +:::note +The Android equivalent is [`appium:timeZone`](#appiumtimezone). +::: + +:::note +This capability is only supported since XCUITest driver version 7.10.0. +::: + +```java +MutableCapabilities capabilities = new MutableCapabilities(); +capabilities.setCapability("appium:appTimeZone", "America/Los_Angeles"); +``` + +:::tip +Using Appium 2? Prevent `appium:`-prefix repetitiveness and start using [`appium:options`](#appiumoptions) for Real Devices instead. +::: + +--- + ## Mobile Appium Timeout Capabilities As with Selenium Tests, Appium also supports different types of timeouts like: @@ -1559,7 +1616,7 @@ capabilities.setCapability("sauce:options", sauceOptions);| OPTIONAL | STRING | Real Devices Only | BETA |
-Set a network profile with predefined network conditions at the beginning of the session. +Set a network profile with predefined network conditions at the beginning of the session. Please refer to the [list of network profiles](https://docs.saucelabs.com/mobile-apps/features/network-throttling/#predefined-network-profiles) for more information about each profile's network conditions. ```java @@ -2050,15 +2107,8 @@ capabilities.setCapability("sauce:options", sauceOptions); Allows you to set a custom time zone for your test based on a city name. Most major cities are supported. - **For Desktop VMs**: can be configured with custom time zones. This feature should work on all operating systems, however, time zones on Windows VMs are approximate. The time zone defaults to UTC. Look for the "principal cities" examples on this [list of UTC time offsets](https://en.wikipedia.org/wiki/List_of_UTC_time_offsets). -- **For iOS Virtual Devices**: you can use this capability to change the time on the Mac OS X VM, which will be picked up by the iOS simulator. -- **For Android Virtual Devices**: this capability is not supported for Android devices, but for Android 7.2 or later, there is a workaround. Use the following ADB command to grant Appium notification read permission in order to use the time zone capability: - -```java -adb shell cmd notification allow_listener -io.appium.settings/io.appium.settings.NLService -``` - - * See the [Appium Android documentation](http://appium.io/docs/en/writing-running-appium/android/android-shell/#mobile-shell) for additional support. +- **For iOS Virtual Devices**: You can use this capability to change the time on the Mac OS X VM, which will be picked up by the iOS simulator. +- **For Android Virtual Devices**: This capability is not supported for virtual Android devices. Consider using [appium:timeZone](#appiumtimezone) instead. :::note Most web apps serve localization content based on the computer's IP Address, not the time zone set @@ -2168,13 +2218,6 @@ While [Visual Testing](/visual) runs on Sauce Labs servers, the URL gets sent to See [Visual Testing with WebDriver](/visual/e2e-testing/setup) and [Visual Commands and Options](/visual/e2e-testing/commands-options). -### Unsupported Appium Capabilities - -These are currently not supported for real devices: - -- `Edit Timezone`: Appium does not provide a capability to edit the timezone of a device in automated testing on real devices. -- See [Virtual Device Capabilities](#virtual-device-capabilities-sauce-specific--optional) for information about timezone capabilities in a virtual device testing. - :::caution Limitations When running a test on a Virtual Device, be aware that each capability value has a 100 characters limitation. If the value exceeds this limit, it will be truncated, which can lead to further side effects or prevent a job from starting. :::