Supported Appium capabilities

Use capabilities to select the device, start applications, and control the Perfecto Appium server.

General settings

Capability Value Description

app


Specifies thePerfectorepository path to anIPA (for iOS) or an APK, APKS, or AAB file (for Android). For virtual devices, this is a ZIP file (for iOS) or an APK or APKS file (for Android).

Incompatible with browserName.

appiumVersion

Java.String object

Specifies which Appium version to use when initializing a device. You may also switch between versions during test execution.

Version numbers are only valid if they are installed on the HSS (such as 1.18.3 or 1.20.2).

If you work with an Appium 2-compliant client, you also need to provide the automationVersion capability. In this case, automationVersion overrides the appiumVersion.

To use this capability, include the following in your tests:

Copy
capabilities.setCapability("enableAppiumBehavior", true); // Mandatory
capabilities.setCapability("appiumVersion", appiumVersion);

where the second parameter is of type Java.String object.

Copy
Example 1
capabilities.setCapability("appiumVersion", "latest"); // To use the latest Appium version installed on the HSS
Copy
Example 2
capabilities.setCapability("appiumVersion", "1.18.3"); // Uses a specific appium version even when older than the default
Important: To swap versions during test execution, the script should include the following before creating a new driver with a new set of capabilities (that include the different requested Appium version):
Copy
{noformat}driver.quit();{noformat}

autoLaunch

true (default)
false

Specifies whether to have Appium install and launch the app automatically.

automationName

Appium (default), XCUITest,
PerfectoMobile

Specifies the automation engine to use - determines the UIElement Class names identified by the automation engine.

This capability is optional. If not set and the device is running a non-iOS OS, the Appium infrastructure will be used. For iOS devices, refer to this article to determine the infrastructure used.

Use XCUITest if automating iOS 10 or later native applications.

Use PerfectoMobile for the Perfecto object tree (uses generic UIElement classes). Not relevant for virtual devices.

Appium Java client 8 uses a direct connection to the Appium server and therefore cannot work with the following capability: ("automationName", "PerfectoMobile");

With Java client 8 or later, you must add the prefix perfecto: to any non-Appium desired capability.

browserName

Chrome
Safari
MobileOS
MobileDefault
PerfectoMobile

Specifies the name of the mobile web browser to automate.

Tip: For application testing, use an empty string.

enableAppiumBehavior

true (default)
false

Controls the Appium architecture used. See also useAppiumForWeb.

For details, see New architecture for Appium testing on Android and New architecture for Appium web and hybrid testing on iOS.

fullReset

true
false (default)

Resets the app state by uninstalling the app. This will also remove the app after the session is complete.

Important: To achieve the desired outcome, be aware that the Perfecto extension dataReset takes precedence over fullReset. The current behavior is as follows:
  • If dataReset = true (default) and fullReset = false (default), the app is uninstalled.

  • If dataReset = true (default) and fullReset = true, the app is uninstalled.

  • If dataReset = false and fullReset = false (default), the app is not uninstalled.

  • If dataReset = false and fullReset = true, the app is not uninstalled.

noReset

true
false (default)

Specifies that the app state should not be reset before this session.

orientation

LANDSCAPE 
PORTRAIT

Starts the device in a certain orientation.

udid


Specifies the unique device identifier of the connected physical device. Not relevant for virtual devices.

Appium 2 capabilities

Going forward, the internal driver version will be used to configure Appium, as shown in the following table.

For migration information, see the Appium documentation: Migrating to Appium 2.x from Appium 1.x

Capability Value Description

automationVersion

For iOS:
3.25.0, 3.33.1, or 3.59.0

For Android:
1.56.1, 1.61.2, or 1.70.1


Determines which version of the specified driver should be used. If this capability is set, it overrides the appiumVersion capability.

For iOS:

  • Appium 1.22.3 version has internal driver version 3.59.0.

  • Appium 1.20.2 version has internal driver version 3.33.1.

  • Appium 1.18.3 version has internal driver version 3.25.0.

For Android:

  • Appium 1.22.3 version has internal driver version 1.70.1.

  • Appium 1.20.2 version has internal driver version 1.61.2.

  • Appium 1.18.3 version has internal driver version 1.56.2.

Perfecto extensions

General Settings

Capability Value Description

autoInstrument

true
false (default)

When set totrue, instruments the iOS or Android application before it is installed.

To work with hybrid applications, install the iOS/Android application as instrumented.

baseAppiumBehavior

YES
NO (default)

Restriction: Only applicable when working with Appium versions prior to 1.22.3.

Selects whether to use the basic behavior of Appium in cases where Perfecto offers alternative behavior (may be expanded in the future with different behaviors):

YES – An element is considered visible if that element's frame is inside the screen frame and the element is hittable.
NO - Default behavior (Perfecto) – An element is considered visible if that element's frame is inside the screen frame.

dataReset

true (default)
false

When re-installing an application, specifies whether all data associated with the application should be deleted and the application will start with a clean slate. When set tofalse, data is not deleted and the updated application continues in the context of the existing data.

geoLocation

China | India | Australia | Japan | S. Korea | France | Spain | Italy | Germany | Finland | UK | Switzerland | Canada | US-East | US-West | Mexico

Sets the geolocation (the physical location of the device) used for testing the application. This is helpful when your app provides different services or content based on a user's location in the world.

scriptName


Sets the script report and report folder names.

Restriction: The script name should not include a blank character.

screenshotOnError

true
false (default)

Specifies whether to generate screenshots for the report only for error conditions. This capability takes priority over thetakesScreenshot capability.

sensorInstrument

true
false (default)

Specifies whether to instrument the iOS or Android application before installing. Instrumentation is required if you need to work with sensor input (for example fingerprint simulation or image injection).

takesScreenshot

true (default)
false

Takes screenshots to display in the report. Relevant only if screenshotOnError is false.

useAppiumForWeb

true
false

Sets the flow for using objects in Safari/Chrome to match Appium's precise flow. Works in tandem with the enableAppiumBehavior capability.

For details, see New architecture for Appium testing on Android and New architecture for Appium web and hybrid testing on iOS.

waitForPageLoad

true
false (default)

Indicates whether the driver.get(url)method of Selenium returns synchronously, that is only after the page is loaded, or asynchronously (default), i.e. immediately after sending the request and before the page is actually loaded in the browser.

Android

Capability Value Description

appActivity


Specifies the activity name for the Android activity you want to launch from your package. This often needs to be preceded by a . (for example .MainActivity instead ofMainActivity)

appPackage


Specifies the Java package of the Android app you want to run

appWaitActivity


Specifies the activity name for the Android activity you want to wait for

appWaitPackage


Specifies the Java package of the Android app you want to wait for

intentAction

(default 
android.intent.action.MAIN)

Specifies the intent action that will be used to start an activity

intentCategory

(default
android.intent.category.LAUNCHER)

Specifies the intent category that will be used to start an activity

intentFlags

(default 0x10200000)

Specifies the flags that will be used to start activity

optionalIntentArguments


Specifies additional intent arguments that will be used to start an activity.

securedScreenInstrument

true | false (default)

When set to true, turns on instrumentation of secured screens on devices running Android 12 and later. In this case, calls on the app that use FLAG_SECURE will be removed (only setFlags() and addFlags() methods that use FLAG_SECURE are affected), and secured screens will be visible in the installed app.

iOS 

Capability Value Description

bundleId


Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require the bundle ID during test startup

processArguments


Arguments to pass to the AUT using instruments

language


Sets the iOS device language for the duration of the script

locale


Sets the iOS device region settings for the duration of the script

Important: Both language and locale expect a ‘locale identifier’ as a value. These capabilities are applicable to iOS devices that support the XCUITest framework.

Appium open source capabilities

In addition,Perfectosupports the list of Appium server capabilities. To reference these, see the Appium documentation.