Legacy | Get network settings

Important: With the Flash deprecation at the end of 2020, a new solution is available that replaces the Perfecto native automation commands clean device,reboot device, and get network settings. For details, see Create, execute, and schedule maintenance scripts (Perfecto IDE alternative).
  • Command: network.settings

  • Subcommand: get

  • 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

Returns the status of the network setting specified: wifi, data (only for devices with a valid SIM card installed), and/or airplane-mode. Can insert the retrieved value into a defined variable. Use the Property parameter to specify the network setting to retrieve.

This command is supported for both Android and iOS devices.

Important: If Airplane Mode is enabled, Data will be disabled.

Parameters

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

wifi (WiFi)

data (Data)

airplanemode (Airplane Mode)

 

The network setting property to be retrieved.

variable     The variable to receive the selected network setting property value.

* 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=get&param.deviceId=6370E775
Copy

JSON response

 {
  "reason": "Success",
  "timer.elapsed": "109",
  "returnValue": "{airplanemode=true, wifi=false, data=false}",
  "testGridReportUrl": "https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-08_09_26_26_940",
  "description": "Success",
  "timer.system": "109",
  "completed": "true",
  "flowEndCode": "SUCCEEDED",
  "executionId": "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",
  "reportKey": "PRIVATE:controller/161108/controller_16-11-08_09_26_26_940.xml",
  "timer.device": "0"}