Legacy | Lock screen

  • Command: screen

  • Subcommand: lock

  • 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

Locks the device screen for a specified number of seconds. Check instantly how your app behaves when the screen is locked.

Parameters

Name Value Default Description
deviceID*     The device for this command.
timeout   10 The time, in seconds, to lock the device.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-06_07_08_05_338?operation=command&securityToken=<your_token>&command=screen&subcommand=lock&param.deviceId=6370E775&param.timeout= 6
Copy

JSON response

{
    "reason":"Success",
    "timer.elapsed":"6985",
    "returnValue":"OK",
    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-06_07_18_52_341",
    "description":"Success",
    "timer.system":"6985",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "executionId":"john@perfectomobile.com_controller_16-11-06_07_18_52_341",
    "timer.ux":"0",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161106/controller_16-11-06_07_18_52_341.xml&ownerId=john@perfectomobile.com&sharingCode=33cbaa3f-6787-4ab3-ab67-c72938374b2d",
    "reportKey":"PRIVATE:controller/161106/controller_16-11-06_07_18_52_341.xml",
    "timer.device":"0"}