UFT Mobile Appium Capabilities

The UFT Mobile integration extends the standard Appium capabilities. The following table provides information about several common capabilities:

Appium capabilities

Appium/UFTM capability Required Comments
oauthClientId *

An Execution type access key that is needed to run tests in UFT Mobile. For details, see Generate and manage access keys (non-admin users).

* If your administrator allowed anonymous logins for Appium scripts, you can leave out the oathClientId and oauthClientSecret capabilities. Administrators can enable anonymous access in the General section of the Administration Settings screen.

oauthClientSecret * * See comments by oauthClientId.
tenantId

When working with shared spaces enabled, you must also include the nine-digit shared space ID. You can find this in the toolbar of the Lab Console. For details, see Connect to a UFT Mobile shared space. The default shared space ID is 999999999.

app --

Not supported in UFTM integration. To install an app on a device, use appPackage and appActivity for Android, and bundleId for iOS.

appPackage (Android)

The package name that identifies the app, displayed as Package ID in the app details card. See the image below this table for an example.

If the app is not already installed on the device, UFT Mobile checks to see if the app exists in the database. If it exists, it installs it automatically before running the test steps.

appActivity (Android)

The name of the Android activity to be launched, displayed as the Launch activity in the app details card. See the image below this table for an example.

If the app is not already installed on the device, UFT Mobile checks to see if the app exists in the database. If it exists, it installs it automatically before running the test steps.

bundleId (iOS)

A unique identifier, the Bundle ID of the app, displayed as Package ID in the app details card. For example, "com.hpe.advantage", or as shown in the example below.

If the app is not already installed on the device, UFT Mobile checks to see if the app exists in the database. If it exists, it installs it automatically before running the test steps.

deviceHostingType

"PrivateOnPremise", "Public", or "PrivateHosting"

deviceType

"real" or "emulator"
platformName "Android" or "iOS"
platformVersion

The version of the OS. You can specify a enumeration symbol, such as <, >, <=. >=, and =.

For example, "platformVersion", ">5.0.1"

deviceName

The physical or emulated device name. You can specify a manufacturer, model, or logical name as it appears in UFT Mobile console. See the image below this table for an example.

If no device name is specified, the script uses a default device for the specified capabilities. Use this capability in conjunction with or instead of udid.

Use these guidelines when specifying a device by its manufacturer, model name, or logical name.

  • By default, the search engine performs a fuzzy search, returning the first device that matches part of the string, even if it is not the best match.
  • If your device name is a sub-string of another device's name, use other capabilities such as udid, to avoid ambiguity.
  • To match an exact string, use a refined search with double quotes. For example "\"Apple iPhone 5c (GSM+CDMA)\"" will look for a device with that exact manufacturer and model name. (Note the use of backslashes as escape characters.)
udid

The UDID identifier of the device as assigned by UFTM. See the image below this table for an example.

If no UDID is specified, the script uses a default device for the specified capabilities. Use this capability in conjunction with or instead of deviceName.

browserName *

When testing web applications, the browser being tested, such as "Safari" for iOS and "Chrome", "Chromium", or "Browser" for Android.

When testing apps, either omit this capability or set it to an empty string. However, if you are testing apps with Node.JS wd, you must add this capability and set it to an empty string.

source

When working with hosted devices, the source of the hosted device: HOSTED or UFTM|HOSTED (both).

automationName

iOS

UFT Mobile allows you to run tests on iOS devices without requiring a Mac machine. The default automation method used for iOS is XCUITest.

If you explicitly want to use UIA automation, set the automationName to uiAutomation. This capability is only available for iOS versions 9.3 through 11.1. In iOS versions higher than 11.1, the capability is not supported and all tests will use XCUITest.

Note: If you are running your Appium test through a Micro Focus testing tool, such as UFT, you can use a connector on any platform (Mac, Windows, or Linux) . If however, you want to run a pure Appium execution using XCUItest, your device must be connected via a Mac connector.

Android OS 5.0 & higher

UiAutomator2 is the default automation engine. The uiautomator2 driver uses Google's UiAutomator2 technology to allow automation on a device or emulator. To overwrite the default and use UiAutomator1, set the value to "android".

 

Android OS < 5.0

UiAutomator1 ("android") is the default for Android OS < 5.0. You can only use UiAutomator1 as the automation engine.

mcWorkspaceName

Enables you to specify an application which was uploaded to a specific workspace.

mc:net:profileName

Enables Network Virtualization in your Appium test and starts a new emulation on the NV Test Manager server.

Specify a network profile to use from the known NV profiles. You can change to a different profile after the test started. For details, see the Common Appium API calls.

Note: When the Appium session terminates, the emulation also stops.

Sample screens

The following sample App Details box (opened by clicking the More button on the App card) shows the Package ID and Launch activity for an Android app.

The following sample device card shows the deviceName (which can be represented as the logical, manufacturer, or model name) and UDID for an Android device.

Back to top

See also: