Legacy | Delete file

  • Command: media

  • Subcommand: delete

  • 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

Deletes a single or multiple files from the device storage. Use the File transfer widget to identify the device folder and file name.

Parameters

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

The device file path, including root and file name, where the file is located. The root can be phone or card.

Example: phone:/images/myImage.jpg

To delete all files in a folder, use a wildcard. Example: phone:/images/*

To view the device file system, log in to the Mobile cloud interface and use the file transfer widget.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-07_13_32_13_507?operation=command&securityToken=<your_token>&command=media&subcommand=delete&param.deviceId=6370E775&param.deviceFile=card:/Pictures/testImagejw.jpg
Copy

JSON response

{
    "executionId":"john@perfectomobile.com_controller_16-11-07_13_32_13_507",
    "reason":"Success",
    "timer.elapsed":"140",
    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-07_13_32_13_507",
    "timer.ux":"140",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161107/controller_16-11-07_13_32_13_507.xml&ownerId=john@perfectomobile.com&sharingCode=b3c4ded3-b894-45c0-b1f5-fa2fe4ee7086",
    "description":"Success",
    "timer.system":"0",
    "reportKey":"PRIVATE:controller/161107/controller_16-11-07_13_32_13_507.xml",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "timer.device":"140"}