Reference for capabilities in Perfecto

Use this reference to familiarize yourself with the capabilities Perfecto supports for automated testing using Appium and Selenium. See also Supported Appium capabilities.

Perfecto authentication

Capability name Description

securityToken*

Your personal security token

For Appium 2, make sure to provide the security token in a HashMap for a capability called perfecto:options, as follows:

Copy
HashMap<String, Object> options = new HashMap<>();
options.put("securityToken", "TOKEN");

capabilities.setCapability("perfecto:options", options);

* Mandatory

Capabilities for selecting a mobile device

The following table lists the supported capabilities for selecting a real mobile device. For usage guidance, see Example: Selecting a mobile device for testing.

To view capabilities supported for virtual mobile devices, see Supported capabilities for virtual mobile devices.

Capability name Description Values/examples

automationInfrastructure

Device automation infrastructure of the mobile

For example: XCUITest, UIAutomation (for iOS), UIAutomator1, UIAutomator2 (for Android)

audioPlayback

Determine if device playback audio should be added to the video recording of the execution or not

true, false. Default is false

description

The device description


deviceName

The deviceId

For example: 345304573489573498

deviceType

The platform type

Web, Mobile

location

The device location

For Example: NA-US-BOS

manufacturer

manufacturer

For example: Apple, Samsung, HTC, Microsoft

model

The device model.

For example: iPhone-5S, Galaxy S III, Xperia Z, 9100, HTC One

network

The device network

For example: AT&T, Verizon

openDeviceTimeout

The timeout, in minutes, to wait for a specific device in case it is not available at the start of the script (use with caution)

Max: 9 minutes

platformName

The device operating system

For example: Android, Windows, iOS

platformVersion

The device operating system version

For example: 9.3.1

resolution

The resolution of the device screen

For example: 1920x1080

screenshotFormat

Type of image

.jpg (default), .png, .bmp

Capabilities for selecting a mobile browser

Capability name

Description

Values

browserName

Browser application name

chrome, safari, mobileDefault

version

Browser version

for example: 131, 130

platform


Any

Capabilities for development

Capability name

Description

eclipseExecutionId

The Eclipse execution id

scriptName

Name used as the Report Name for the Report Library and Live Stream interfaces (see also the Smart Reporting capabilities below)

To learn more see, Supported Appium capabilities.

Capabilities for testing on virtual mobile devices

To learn more, see Supported capabilities for virtual mobile devices.

Capabilities for Desktop Web testing

Learn which capabilities you can use to configure the web machine and web application you want to run.

Web machine configuration capabilities

The following table lists capabilities you can use to define the machine to be used for your Web app testing. Note that Windows machines are VMs. For usage guidance, see Example: Using web machine configuration capabilities.

Important: The system automatically selects a Selenium 4.x Server version depending on whether the request has been submitted in a valid W3C syntax.
Capability name Description Values Comments

addHostsRecord

Add custom records to the VM's hosts file.

<key, value> entry, where

  • Key is the IP-address
  • Value is DNS hostname to add to the file

browserName

The browser running on VM.

Internet Explorer, Chrome, Firefox, Edge, Safari.


browserVersion

The browser version.

See here for supported browser versions.

The browserVersion capability supports the following values in addition to a version number:

  • latest: This will always run the latest supported version for the selected browser.
  • latest-1: This will run the version previous to the latest version supported.
  • latest-2: This will run a version two previous to the latest version supported.
  • beta: This will always run the latest beta-testing version for the selected browser.

These values will be translated to the appropriate version number and will be listed in the execution report with the version number.

When running a Safari session, you must specify the version number in the browserVersion capability. Including latest as the version number may result in an error.

deviceType

The platform type

Web, Mobile.


installCertificates

The list of web certificates to be installed

To learn how to install certificates manually and for information on error codes, see Manage Windows web certificates.

File names, separated by comma, with the following file extensions: .crt, .cer, .pem

 

location

Location of Perfecto Web machine facility, when using a virtual web platform.

When accessing physical Mac devices use same values as for Mobile selection (See Note2 below)

US East, EU Germany, AP Sydney.

The location capability is optional when platformName capability is Windows but mandatory when platformName is Mac.


platformName*

The VM OS.

Windows, Mac.


platformVersion*

The OS version.

See list of supported versions.


resolution

The VM display resolution.

1024x768 (default) See here for complete list of supported resolutions.


uploadFileFromRepo

Upload a file from the Perfecto repository to the virtual machine. Perfecto then downloads the file to the following location on the Mac or virtual Windows machine:

Windows: C://Temp//

Mac: /tmp/

The location of the uploaded file is returned as part of the return capability uploadedFileLocation.

This functionality is also available through the Perfecto extension perfecto:file:upload.

uploadFromRepo

To use this capability, add it to your test scripts as follows, where fileLocation is the location of the file in the Perfecto repository.

Tip: For information on retrieving the file location, see Manage the repository > View, copy, or update file information.
capabilities.setCapability(“uploadFileFromRepo”,
“PUBLIC:apiDemos2.apk”);

* Mandatory

Web application capabilities

Taking screenshots affects the execution time of the desktop web test. Screenshot capabilities support Selenium commands (not, for example, Visual Analysis or Assert). For usage guidance, see Example: Using web application capabilities.

Capability name Description Possible values Default value

takesScreenshot

System takes screenshots of application at different points during execution and attaches them to the execution report.

true | false

false

screenshotOnError

System takes screenshot of application at point where an error status is reported. Screenshot is attached to the execution report.

true | false

true

General capabilities

Capability name Description Value

waitForAvailableLicense

Adds the option to wait for an available license when all licenses are in use. In this case, Perfecto displays the following error message:

EE-500-0001 - Max number of sessions reached. To add auto wait timeout of up to 15 minutes, use the "'waitForAvailableLicense': true" capability

Copy

Usage example

capabilities.setCapability("perfecto:waitForAvailableLicense", true);

Boolean (default: false)

Smart Reporting capabilities

Test analysis with Smart Reporting uses different test identifying parameters as flags associated with the test reports. These identifying items are used to filter, select, or just to easily identify the test report. These values may be associated with the test using the reporting SDK or, alternatively, using the desired capabilities shown in Example: Using Smart Reporting capabilities.

Capability name Description Values

report.projectName

Identifier of the test run project name

String

report.projectVersion

Version number associated with the project

String

report.jobName

CI Job name for this test

String

report.jobNumber

CI Job number for this test

Integer

report.jobBranch

Name of test branch, if relevant

String

report.tags

Any tags user associated with this test

Strings, separated by a comma (',')

report.customFields

Any set of custom parameters to associate with the test run

Strings in the format key=value,key=value...