Legacy | Cloud SMS
-
Command: gateway
-
Subcommand: sms
-
Supported Platforms: Native (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
Sends an SMS message to the selected destination. It is possible to select multiple destinations that may include devices, users, and phones.
There is no default. To use this command, at least one destination must be selected.
When specifying a device via the to.device parameter, verify that the device has a SIM card, which is required for sending SMS.
When specifying a number via the to.number parameter, replace the '+' character with %2B in the sent string.
Parameters
Name | Value | Default | Description |
---|---|---|---|
body |
Test from Perfecto |
The message text for this command. |
|
to.device |
The destination device. It is possible to select multiple devices. Make sure the device has a SIM card, which is required for sending SMS. |
||
to.user |
The destination user. It is possible to select multiple users. The user identifier is the Perfecto username. The user must be registered with the correct mobile number. The business number field does not apply. |
||
to.logical |
user (User) none (None) |
The user currently running the script. |
|
to.number |
The destination phone number. It is possible to select multiple phone numbers. In the sent string, make sure to replace the '+' character with %2B. Format: %2B[country code][area code][phone number] Example: %2B17812054111 |
* Mandatory
Request & Response
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-09_12_44_59_31771?operation=command&securityToken=<your_token>&command=gateway&subcommand=sms¶m.to.device=FA53XYJ18894¶m.body=my%20body
JSON response
{
"executionId": "john@perfectomobile.com_controller_16-11-09_12_44_59_31771",
"reason": "Success",
"timer.elapsed": "16",
"testGridReportUrl": "https://mycloud.reporting-01.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-09_12_44_59_31771",
"timer.ux": "0",
"singleTestReportUrl": "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161109/controller_16-11-09_12_44_59_31771.xml&ownerId=john@perfectomobile.com&sharingCode=993fbf5a-7d97-4390-892e-734fac09c4dd",
"description": "Success",
"timer.system": "16",
"reportKey": "PRIVATE:controller/161109/controller_16-11-09_12_44_59_31771.xml",
"completed": "true",
"flowEndCode": "SUCCEEDED",
"timer.device": "0"}