Legacy | Close application

  • Command: application

  • Subcommand: close

  • 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

Closes an application on the device. The application process is killed, not minimized. If you reopen the application, the application will launch from the start page. (If you minimize the application, for example by using the Home button, the application will launch from the last page previously open.)

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

This command does not clear the cache. Service applications that live forever in the background may be auto-relaunched.

How to close an iOS application

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.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/?operation=command&securityToken=value&command=application&subcommand=close&param.deviceId=570E7512
Copy

JSON response

{
    "reason" : "Success",
    "timer.elapsed" : "1641",
    "returnValue" : "OK",
    "testGridReportUrl" : "https://mobilecloud.reporting-stg.perfectomobile.com?externalId[0]=samb@perfectomobile.com_controller_16-11-06_08_50_17_402",
    "description" : "Success",
    "timer.system" : "16",
    "completed" : "true",
    "flowEndCode" : "SUCCEEDED",
    "executionId" : "samb@perfectomobile.com_controller_16-11-06_08_50_17_402",
    "timer.ux" : "1625",
    "singleTestReportUrl" : "https://qatestlab.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161106/controller_16-11-06_08_50_17_402.xml&ownerId=samb@perfectomobile.com&sharingCode=39551082-0101-4f1c-900c-f27b62b897e2",
    "reportKey" : "PRIVATE:controller/161106/controller_16-11-06_08_50_17_402.xml",
    "timer.device" : "1625"}