Legacy | Set network settings

  • Command: network.settings

  • Subcommand: set

  • 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

Description

Sets the status of the specified network settings: wifi, data (only for devices with a valid SIM card installed), and/or airplane-mode.

Restriction: Setting airplane mode is supported for devices running Android version 7.0 or earlier. Setting the radio mode works for devices running Android version 9.0 or earlier but is subject to Google not changing the implementation, so the command is not guaranteed to work in the future.
Tip: 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 and immediately back on

Parameters

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

enabled (Enabled)

disabled (Disabled)

  Enable/disable the device WiFi.
data

enabled (Enabled)

disabled (Disabled)

  Enable/disable the device data from the mobile carrier. The device must have a SIM. Available for Android version 2.3 to 4.4.
airplanemode

enabled (Enabled)

disabled (Disabled)

  Enable/disable the device Airplane mode.
radioMode

enabled (Enabled)

disabled (Disabled)

  Enable/disable the device radio signal.

* Mandatory parameter

Request & Response 

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-08_09_26_26_940?operation=command&securityToken=<your_token>&command=network.settings&subcommand=set&param.deviceId=6370E775&param.airplanemode=enabled
Copy

JSON response

 {
  "executionId": "john@perfectomobile.com_controller_16-11-08_09_26_26_940",
  "reason": "Success",
  "timer.elapsed": "6469",
  "testGridReportUrl": "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-08_09_26_26_940",
  "timer.ux": "0",
  "singleTestReportUrl": "https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161108/controller_16-11-08_09_26_26_940.xml&ownerId=john@perfectomobile.com&sharingCode=166ca97d-a844-443e-bb78-99da59f69f8f",
  "description": "Success",
  "timer.system": "6469",
  "reportKey": "PRIVATE:controller/161108/controller_16-11-08_09_26_26_940.xml",
  "completed": "true",
  "flowEndCode": "SUCCEEDED",
  "timer.device": "0"}