Supported Appium capabilities
Use capabilities to select the device, start applications, and control the Perfecto Appium server.
On this page:
General settings
Capability | Value | Description |
---|---|---|
|
Specifies the Perfecto repository path to an IPA (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. |
|
Java.String object |
Specifies which Appium version to use when initializing a device. You can also switch between versions using a capability provided to start the session. A version number is only valid if it is supported by Perfecto (such as 1.22.3 or, as of June 30, 2024, 2.4.1). If you work with an Appium 2-compliant client, you also need to provide the To use this capability, include the following in your tests: Copy
where the second parameter is of type Copy
Example 1
Copy
Example 2
Important: To swap versions during test execution, the script should include the following code before creating a new driver with a new set of capabilities (that include the different requested Appium version):
Copy
|
|
|
|
iOS only. Specifies whether to allow alerts automatically during your test session. Set the value according to your test requirements. |
|
|
iOS only. Specifies whether to dismiss alerts automatically during your test session, including privacy access permission alerts. Turned off by default. |
|
|
Android only. Specifies whether to automatically grant all the permissions that an Android app requests upon installation. |
|
|
Specifies whether to have Appium install and launch the app automatically. |
|
Specifies the automation engine to use. Determines the UIElement Class names identified by the automation engine. With Appium 2.4.1 (available in Perfecto hybrid and enterprise clouds as of June 30, 2024), you can set this capability to one of the following values:
With Appium 1.22.3, this capability is optional. If not set and the device is running a non-iOS OS, the Appium infrastructure will be used. Use PerfectoMobile for the Perfecto object tree (uses generic UIElement classes). You can also use a value of Appium Java client 8 uses a direct connection to the Appium server and therefore cannot work with the following capability: With Java client 8 or later, you must add the prefix |
|
|
|
Specifies the name of the mobile web browser to automate. For application testing, use an empty string or omit the capability. |
|
(Android only) 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. |
|
|
|
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:
|
|
|
Specifies that the app state should not be reset before this session. |
|
|
Starts the device in a certain orientation. |
|
|
Specifies whether Appium should skip capturing logs during the test execution. By default, this functionality is disabled to manage performance on Perfecto servers. If you need Appium to capture logs by setting the value of this capability to
|
|
|
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 |
---|---|---|
|
iOS:
Android:
|
Determines which version of the specified driver should be used. If this capability is set, it overrides the appiumVersion capability. For iOS:
For Android:
|
Perfecto extensions
General Settings
Capability | Value | Description |
---|---|---|
|
|
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. |
|
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. |
|
|
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 to false, data is not deleted and the updated application continues in the context of the existing data. |
|
|
|
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. For more information, see IP Geolocation testing. |
|
|
Sets the script report and report folder names. The script name should not include a blank character. |
|
|
Specifies whether to generate screenshots for the report only for error conditions. This capability takes priority over thetakesScreenshot capability. |
|
|
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). |
|
|
Takes screenshots to display in the report. Relevant only if screenshotOnError is 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. |
|
|
|
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 |
---|---|---|
|
|
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) |
|
|
Specifies the Java package of the Android app you want to run |
|
|
Specifies the activity name for the Android activity you want to wait for |
|
|
Specifies the Java package of the Android app you want to wait for |
|
default: |
Specifies the intent action that will be used to start an activity |
|
default: |
Specifies the intent category that will be used to start an activity |
|
default: |
Specifies the flags that will be used to start activity |
|
|
Specifies additional intent arguments that will be used to start an activity. |
|
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 |
iOS
Capability | Value | Description |
---|---|---|
|
|
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 |
|
|
Arguments to pass to the AUT using instruments |
|
|
Sets the iOS device language for the duration of the script |
|
|
Sets the iOS device region settings for the duration of the script |
Appium open source capabilities
In addition,Perfectosupports the list of Appium server capabilities. To reference these, see the Appium documentation.