Legacy | Start application

  • Command: application

  • Subcommand: open

  • Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium

    All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.

  • Supported OS: Android, iOS

Description

Launches an application on the device. Use this function at the beginning of a script to ensure a known starting point for the user.

To use this command, one of the two application identifiers is required. For information on retrieving the application identifier, see Application identifier.

Note:

If you have an IDE that likes to default to webview, set the context to native to run this command.

Parameters

Name Value Default Description
deviceID*     The device for this command.
name     The application name as it is displayed on the device screen.
identifier     The identifier of the application.
timeout     The time, in seconds, to wait for the application to start. A zero value will start the application, without any validation or retries, and return immediately. On Android, a value greater than zero will wait for the defined time and fail if the app is not loaded by that time. In iOS the behavior is identical to the default undefined timeout, the command will validate that the application has started on iOS devices only.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/samb@perfectomobile.com_controller_16-11-06_08_38_40_392?operation=command&securityToken=<your_token>&command=application&subcommand=open&param.deviceId=9A5F8BA0&param.name=com.android.calendar
Copy

JSON response

{
    "reason" : "Success",
    "timer.elapsed" : "406",
    "returnValue" : "OK",
    "testGridReportUrl" : "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=samb@perfectomobile.com_controller_16-11-06_08_38_40_392",
    "description" : "Success",
    "timer.system" : "0",
    "completed" : "true",
    "flowEndCode" : "SUCCEEDED",
    "executionId" : "samb@perfectomobile.com_controller_16-11-06_08_38_40_392",
    "timer.ux" : "406",
    "singleTestReportUrl" : "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161106/controller_16-11-06_08_38_40_392.xml&ownerId=samb@perfectomobile.com&sharingCode=319e1e9c-2e5e-44f9-86fa-edb6975d467d",
    "reportKey" : "PRIVATE:controller/161106/controller_16-11-06_08_38_40_392.xml",
    "timer.device" : "406"}