Legacy | Get file

  • Command: media

  • Subcommand: get

  • 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

Copies a file from the device's file-system to the Perfecto Repository. Provide the full specification of the file location in the Repository and the target file location (including the file name) on the device.

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 retrieve all files in a folder, use wildcard.

Example: phone:/images/*

When using a wildcard, the Repository key parameter should specify a folder.

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

repositoryFile*    

The full repository path, including directory and file name, where to save the file.

Example: PRIVATE:dir1/dir2/name.jpg

* 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=get&param.deviceId=6370E775&param.deviceFile=card:/Pictures/testImagejw.jpg&param.repositoryFile=PRIVATE:devFile/imageDev.jpg   
Copy

JSON response

{
    "executionId":"john@perfectomobile.com_controller_16-11-07_13_32_13_507",
    "reason":"Success",
    "timer.elapsed":"3172",
    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-07_13_32_13_507",
    "timer.ux":"3172",
    "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":"3172"}