Legacy | Start activity

  • Command: activity

  • Subcommand: open

  • 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

Starts an Android activity on the device.

Description

Starts an Android activity on the device. Android applications are composed of a series of "Activity" units. Each Activity presents a UI screen that allows users to perform some part of the application, such as call a number, take a photo, send an email, or view a map. When testing the application, it may be desirable to start the application execution from a specific Activity, rather than the initial Activity (usually referred to as the .Main).

Applications can be large and complex, written by many development teams. The start activity and sync activity commands enable a tester to start and sync a specific activity on the device and decreases the time it takes to write a test, allowing more coverage in a dynamic environment where time to develop tests is short.

Parameters

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

The package name.

Example - com.sec.android.app.camera

To get the package name, use the Device info command by setting the property parameter to Current package. This will retrieve the package name of the open application on the device.

activity*    

The activity name.

Example - .Camera

To get the activity name, use the Device info command by setting the property parameter to Current activity. This will retrieve the activity name of the open application on the device.

action     The intent action name.
category     The intent category name.
flags     The intent flags name.
arguments     The intent arguments name.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-12-07_08_30_54_151?operation=command&securityToken=<your_token>&command=activity&subcommand=open&param.deviceId=570E7512&param.package=com.google.keep&param.activity=.main
Copy

JSON response

{
    "reason":"Success",
    "timer.elapsed":"1750",
    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-12-07_08_30_54_151",
    "description":"Success",
    "timer.system":"547",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "executionId":"john@perfectomobile.com_controller_16-12-07_08_30_54_151",
    "timer.ux":"1203",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml&ownerId=john@perfectomobile.com&sharingCode=a8d8ba68-ee11-4594-a83a-2eca62034d2c",
    "reportKey":"PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml",
    "scopes":"0",
    "timer.device":"1203"}