Skip to main content

Appium Server Test Execution

Digital.ai Testing Cloud supports Appium open-source execution when any Appium Tests are run.

To use Appium Open Source, use the capability appiumVersion.

info

Get started using Appium Server with the Quick Start GitHub Repository.

Appium Version Capability

The appiumVersion capability specifies the version of Appium.

The currently supported versions are:

  • 1.22.3
  • 2.15.0
  • 2.16.2
  • 2.17.1 (Supported since version 25.4)
  • 2.18.0 (Supported since version 25.4)
  • 2.19.0 (Supported since version 25.4)
  • 3.0.1 (Supported since version 25.9)
  • 3.1.0 (Supported since version 25.9)
  • 3.1.2 (Supported since version 26.1)
Local Appium compatibility
  • Appium versions 3.3.0, 3.3.1, and 3.4.2 require Digital.ai Testing Cloud 26.5 or later when used with Local Appium Server deployments due to compatibility changes in the cloud and agent components.
  • This limitation applies only to Local Appium Server deployments.
  • Appium OSS executions can use these Appium versions with earlier cloud versions, provided the selected Appium OSS image supports them.

Appium Version Desired Capability

dcIOS.setCapability("appiumVersion", "<version tag>");
dcIOS.setCapability("automationName", "XCUITest");
dcIOS.setCapability(MobileCapabilityType.PLATFORM_VERSION, "11.2.6");

Application Capability

MobileCapabilityType.APP is an existing capability that specifies the Cloud Application. It is extended to specify the application version.

It needs to follow the pattern provided below.

Cloud Application Desired Capability

dcIOS.setCapability(MobileCapabilityType.APP, "cloud:<Bundle ID>:<App version>");

For example:

Cloud Application Desired Capability Example

dcIOS.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank:2435");

Complete Examples

Application Test Example

String MyDeviceUDID="1234567890ABCDEF";

dcIOS.setCapability("appiumVersion", "1.22.3");
dcIOS.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank:2435");
dcIOS.setCapability("bundleId", "com.experitest.ExperiBank");
dcIOS.setCapability(MobileCapabilityType.PLATFORM_VERSION, "11.2.6");
dcIOS.setCapability("automationName", "XCUITest");
dcIOS.setCapability("deviceName", "auto");
dcIOS.setCapability("udid", MyDeviceUDID);
dc.setCapability("user", <user name>);
dc.setCapability("password", <password>);
dc.setCapability("testName", "My First Appium OSS Test");

Web Test Example

String MyDeviceUDID="1234567890ABCDEF";

dcIOS.setCapability("appiumVersion", "1.22.3");

dcIOS.setCapability(MobileCapabilityType.BROWSER_NAME, "Safari");

dcIOS.setCapability("automationName", "XCUITest");
dcIOS.setCapability("deviceName", "auto");
dcIOS.setCapability("udid", MyDeviceUDID);
dc.setCapability("user", getUsername());
dc.setCapability("password", getPassword());
dc.setCapability("testName", "My First Appium OSS Test");

Long-Running Commands Limitation

There are some long-running commands in Appium, like [runAppInBackground](appium-server-test-execution.md).

In Appium versions below 1.20, the maximum command execution time is 10 minutes (Appium limitation). After Appium 1.20, the maximum command execution time is 20 minutes.

In order to use long-running commands, increase the values in these capabilities.

dc.setCapability("newCommandTimeout", 900); // 15 Minutes
dc.setCapability("wdaConnectionTimeout", 900_000); // 15 Minutes (Relevant for iOS only)

Alternatives to the driver.get("URL") Command

On iOS 16 and earlier, the Appium driver.get("URL") command can be unreliable when running Safari web tests. The command returns successfully, but the browser intermittently fails to load the requested page. The behavior is inconsistent — within a single test, one URL may load while the next does not, and the same device can pass one run and fail the next. It has been observed on both shared and dedicated devices, and on multiple Appium versions.

In the Appium server log, the failure appears as a page-readiness timeout:

[RemoteDebugger] Navigating to new URL: 'https://www.google.com'
[RemoteDebugger] Timed out after 6000ms of waiting for the https://www.google.com page readiness. Continuing anyway
info

Appium has dropped support for iOS 16 and earlier. If you are able to upgrade your devices to a newer iOS version, that is the preferred long-term fix.

Workaround: Launch Safari with the SeeTest launch Command

Where driver.get("URL") is unreliable, use the SeeTest Launch With Options command instead. Launching com.apple.mobilesafari with a url launch option navigates the browser directly and avoids the Appium page-readiness step.

Pass the launch options as a JSON string, with the following keys:

KeyValueDescription
urlStringThe URL to open in the browser.
relaunchbooleanSet to false to navigate in the existing browser session instead of restarting it.
stopifrunningbooleanSet to false so that a running Safari instance is reused rather than stopped.

Example - Java navigate to a URL using the SeeTest launch command

JsonObject launchOptions = new JsonObject();
launchOptions.addProperty("stopifrunning", false);
launchOptions.addProperty("relaunch", false);

launchOptions.addProperty("url", "https://www.google.com");
driver.executeScript("seetest:client.launch", "com.apple.mobilesafari", launchOptions.toString());

launchOptions.addProperty("url", "https://digital.ai/");
driver.executeScript("seetest:client.launch", "com.apple.mobilesafari", launchOptions.toString());

launchOptions.addProperty("url", "https://demo-bank.ct.digital.ai");
driver.executeScript("seetest:client.launch", "com.apple.mobilesafari", launchOptions.toString());

driver.findElement(By.xpath("//*[@data-auto='username']//input")).sendKeys("company");

After the launch command returns, continue to interact with the page using standard Appium element commands. The WebDriver context is unchanged — only the navigation step is replaced.

note

The SeeTest Appium Extension supports only the JSON-string form of this command. The Map-based launch(String applicationIdentifier, Map launchOptions) overload is not supported.

For the full list of supported launch option keys, see Launch with Options