Legacy | Close device

  • Command: device

  • 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

Releases one ore more devices previously allocated to the current session/script execution. When a device is closed, it will automatically be returned to its default state, orientation, and home screen.

Parameters

Name Value Default Description
deviceID*     The device for this command.
script

script (True)

noscript (False)

True

Specify whether to run the close script or not.

True (default) - run the close script.

False - Don't run the close script.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-02_12_21_16_829?operation=command&securityToken=<your_token>&command=device&subcommand=close&param.deviceId=6370E775
Copy

JSON response

{
    "executionId":"john@perfectomobile.com_controller_16-11-02_12_21_16_829",
    "reason":"Success",
    "timer.elapsed":"20844",
    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-02_12_21_16_829",
    "timer.ux":"0",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161102/controller_16-11-02_12_21_16_829.xml&ownerId=john@perfectomobile.com&sharingCode=e967892e-5541-4b12-aa04-dc039ed8908f",
    "description":"Success",
    "timer.system":"20844",
    "reportKey":"PRIVATE:controller/161102/controller_16-11-02_12_21_16_829.xml",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "timer.device":"0"}