= pCloudy Mobile Commands - pCloudy documentation

Overview

Use Appium Client methods to use pCloudy API's in automation scripts. By using the code mentioned below, users can send commands to the mobile devices used for automation teting. This will help users to use pCloudy features in their test automation to bring more values to functional tests.

CommandDescription
driver.executeScript("pCloudy_executeAdbCommand", "ADB_COMMAND");User can execute adb command on the booked device during the Appium session.

Example:- Object obj = driver.executeScript("pCloudy_executeAdbCommand", "adb devices");
System.out.println("@Output: " + obj);
driver.executeScript("pCloudy_getNetworkSimulationProfiles");User can get what are all network profiles there according to that user can simulate the network.

Example:- Object profileString = driver.executeScript("pCloudy_getNetworkSimulationProfiles");String[]
profileArray = profileString.toString().split(","); System.out.println("@Devices:" + obj);
driver.executeScript("pCloudy_shapeNetworkSimulation", "Profile_Name");User can set the network profiles like 3G, 4G etc.

Example:- Object profileString = driver.executeScript("pCloudy_getNetworkSimulationProfiles"); String[] profileArray = profileString.toString().split(","); driver.executeScript("pCloudy_shapeNetworkSimulation", profileArray[4]);
driver.executeScript("pCloudy_unShapeNetworkSimulation");User can unset network profiles.

Example:- driver.executeScript("pCloudy_unShapeNetworkSimulation");
driver.executeScript("pCloudy_setAndroidLocation", "lattitude","longitude");User can set the Android location using lattitude and longitude.

Example:- obj1 = driver.executeScript("pCloudy_setAndroidLocation", "1.2345d","1.2345d");
driver.executeScript("pCloudy_switchDeviceLocation", "true/false");User can toggle device location.

Example:- Object obj1 = driver.executeScript("pCloudy_switchDeviceLocation", "true");
driver.executeScript("pCloudy_enablewifi", "true/false");User can toggle wifi.

Example:- driver.executeScript("pCloudy_enablewifi", "true");
driver.executeScript("pCloudy_getVideo", "true");User can get the video during Appium session.

Example:- driver.executeScript("pCloudy_getVideo", "true");