Capabilities
Capabilities serve as a collection of keys and values that are transmitted to the Appium server to instruct it on the type of automation session to initiate. These capabilities offer diverse options to customize the server's behavior during automation. For instance, the platformName
capability can be configured as iOS
to indicate the need for an iOS session, as opposed to an Android one. Another example is the safariAllowPopups
capability, which can be set to true
to ensure that, during a Safari automation session, JavaScript can open new windows.
Appium tests closely resemble Selenium tests as both employ the same WebDriver, and Capabilities are utilized in a similar manner.
Furthermore, some capabilities can be utilized as environment variables, allowing you to fetch information like the API key directly from your local environment without the need for replication within the test script:
String bitbar_apiKey = env.get("BITBAR_APIKEY");
Custom BitBar Capabilities
To make the most of BitBar's infrastructure, devices, and testing capabilities, you can choose from additional capabilities. When you run your Appium tests from your end, you will find that some of these capabilities are necessary, while others are optional, giving you flexibility in your testing setup.
When testing with BitBar, you can customize your test runs by configuring custom capabilities organized within the bitbar:options
object. This structured methodology, guided by adherence to W3C standards, enables you to establish customized settings that align with your testing requirements. This user-friendly structure ensures that you can tailor your tests to match your preferences.
Important
When using Appium version 1.x with Android, you can still use capabilities with the bitbar_
prefix individually without the requirement for aggregation within the bitbar:options
object.
Capability | Value Type | Requirement | Description |
---|---|---|---|
| 32-character alphanumeric string | Required | A security parameter that allows users to provide a unique authentication key or token necessary to access and interact with specific services or resources. This capability is crucial for secure access and authorization when working with external APIs, services, or protected data. The API key is available in the My Account view. |
| String Integer URL | Required | Specifies the application file ( For example:
|
| String | Optional | Available in BitBar Public Cloud, BitBar Private Cloud, and BitBar Enterprise, empowers you to connect to an older version of the Appium server when the need arises. This ensures compatibility and flexibility in your testing setup. Default value:
Currently, we employ Appium 2.1 for Android testing and Appium 2.0 for iOS testing. Android also supports compatibility with various 1.x versions, providing viable alternatives. |
| Boolean | Optional | Allows users to configure and control biometric authentication settings during test scenarios. It provides means to enable or disable biometric authentication mechanisms, such as fingerprint or facial recognition, within the testing environment. This capability is particularly useful for testing apps or processes that involve biometric security features. |
| String | Optional | Enables you to provide a project description. For example, |
| String | Required | A distinctive identifier assigned to one particular device within BitBar. For example, TipAlternatively, you can employ a script to search for devices based on specific properties, such as using a Python script as an example. When you use the |
| Integer | Optional | The capability enables you to initiate a session with a single free device randomly chosen from a specific device group. For example, by indicating The request fails if there are no free devices within the specified device group. |
| Boolean | Optional | Determines how a system selects a device based on the provided name. When set to When you use the Make sure to use it in pair with the |
| Integer | Optional | Available in BitBar Public Cloud, BitBar Private Cloud, and BitBar Enterprise, provides users the flexibility to utilize a testing framework other than the default. This feature is particularly useful for Private Cloud users managing various projects with different framework configurations. The default value is set to the default framework ID (for example, |
| URL | Optional | Defines the endpoint, for which the REST call will be executed after the test finishes. |
| Integer | Optional | Designates the maximum duration of inactivity in seconds that a test session or automation framework will allow before automatically ending the session. This capability ensures efficient resource management by terminating idle sessions to free up resources for other tasks. |
| String | Optional | The specific device language recognized by the Locale ID from the |
| Integer | Optional | Specifies the waiting duration in seconds (maximum 60) that the broker should wait for a new Appium session after the last call to |
| String | Optional | The project name that will be displayed on the Web UI. If none is provided, the Cloud sets a Project X name to your run. For example, |
| String | Optional | Provides a user-defined name or identifier for a specific test within a testing environment. It allows testers to label and distinguish individual tests, making it easier to track and identify test results, especially in cases involving multiple tests or test suites. |
| String | Optional | The user-provided name for each test run within a project. The Cloud service assigns a default name if a name is not specified. For example, |
| Integer | Optional | Defines the maximum duration, in seconds, that is allowed for the complete execution of a test. This timeout is adjustable for users with an active plan or subscription and helps ensure that test execution does not exceed a specified time limit. Default value: Java: capabilities.SetCapability( "bitbar:options", "{ 'testTimeout': '1800' }" ); |
Standard Appium Capabilities
Refer to the Appium documentation to access the comprehensive list of available capabilities for Appium.