Legacy | Toggle radio
-
Command: radio
-
Subcommand: toggle
-
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
Description
Turns the device's Radio signal on or off. This essentially disconnects or re-connects the cellular service of the device.
The command works for devices running Android 9.0 or earlier, but this is subject to Google not changing the implementation, so the command is not guaranteed to work in the future.
If the device does not reconnect when the Radio signal is turned on, you may need to do one of the following:
- Reboot the device.
- Turn Airplane Mode off (using Set Network Settings command) and immediately back on.
Parameters
Name | Value | Default | Description |
---|---|---|---|
deviceId* | The device for this command. | ||
mode |
on (On) off (Off) |
On | Toggles the device radio signal on or off. |
* Mandatory parameter
Request & Response
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_18-10-08_09_26_26_940?operation=command&seurityToken=<your_token>&command=radio&subcommand=toggle¶m.deviceId=6370E775¶m.mode=on
JSON response
{
"executionId": "john@perfectomobile.com_controller_18-10-08_09_26_26_940",
"reason": "Success",
"timer.elapsed": "6469",
"testGridReportUrl": "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_18-10-08_09_26_26_940",
"timer.ux": "0",
"singleTestReportUrl": "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161108/controller_18-10-08_09_26_26_940.xml&ownerId=john@perfectomobile.com&sharingCode=166ca97d-a844-443e-bb78-99da59f69f8f",
"result": "OK",
"timer.system": "6469",
"reportKey": "PRIVATE:controller/161108/controller_18-10-08_09_26_26_940.xml",
"completed": "true",
"timer.device": "0"}