Network Simulation - Automation
  • 06 Sep 2023
  • 1 Minute to read
  • Dark
    Light

Network Simulation - Automation

  • Dark
    Light

Article summary

Steps to perform Network Simulation through Automation

pCloudy provides an easy-to-call method that can be added to user Appium scripts in about 5 to 10 lines of code, depending on what you are trying to do.

Users can use the below-mentioned command in the appium script to shape/unshape the network profile

Map params = new HashMap<>();
//Enter Network profile name
params.put("profileName", "4G-LTE-Average");
//Shape selected network profile
System.out.println(driver.executeScript("mobile:network:start",params));
driver.navigate().to("https://device.pcloudy.com"
//Unshape selected network profile
"full_name": "Apple_iPadPro3rdGen_Ios_14.6.0_3f939",
System.out.println(driver.executeScript("mobile:network:stop",params));

Here's an Example -
image.png


Was this article helpful?