Package io.appium.java_client.android
Class AndroidMobileCommandHelper
java.lang.Object
io.appium.java_client.MobileCommand
io.appium.java_client.android.AndroidMobileCommandHelper
This util class helps to prepare parameters of Android-specific JSONWP
commands.
-
Field Summary
Fields inherited from class io.appium.java_client.MobileCommand
ACTIVATE_APP, CLOSE_APP, commandRepository, COMPARE_IMAGES, CURRENT_ACTIVITY, END_TEST_COVERAGE, EXECUTE_DRIVER_SCRIPT, EXECUTE_GOOGLE_CDP_COMMAND, FINGER_PRINT, GET_ALLSESSION, GET_CLIPBOARD, GET_CONTEXT_HANDLES, GET_CURRENT_CONTEXT_HANDLE, GET_CURRENT_PACKAGE, GET_DEVICE_TIME, GET_DISPLAY_DENSITY, GET_EVENTS, GET_LOCATION, GET_NETWORK_CONNECTION, GET_PERFORMANCE_DATA, GET_SCREEN_ORIENTATION, GET_SCREEN_ROTATION, GET_SESSION, GET_SETTINGS, GET_STRINGS, GET_SUPPORTED_PERFORMANCE_DATA_TYPES, GET_SYSTEM_BARS, GSM_CALL, GSM_SIGNAL, GSM_VOICE, HIDE_KEYBOARD, INSTALL_APP, IS_APP_INSTALLED, IS_KEYBOARD_SHOWN, IS_LOCKED, LAUNCH_APP, LOCK, LOG_EVENT, LONG_PRESS_KEY_CODE, NETWORK_SPEED, OPEN_NOTIFICATIONS, PERFORM_MULTI_TOUCH, PERFORM_TOUCH_ACTION, POWER_AC_STATE, POWER_CAPACITY, PRESS_KEY_CODE, PULL_FILE, PULL_FOLDER, PUSH_FILE, QUERY_APP_STATE, REMOVE_APP, REPLACE_VALUE, RESET, RUN_APP_IN_BACKGROUND, SEND_SMS, SET_CLIPBOARD, SET_LOCATION, SET_NETWORK_CONNECTION, SET_SCREEN_ORIENTATION, SET_SCREEN_ROTATION, SET_SETTINGS, SET_VALUE, SHAKE, START_ACTIVITY, START_RECORDING_SCREEN, STOP_RECORDING_SCREEN, SWITCH_TO_CONTEXT, TERMINATE_APP, TOGGLE_AIRPLANE_MODE, TOGGLE_DATA, TOGGLE_LOCATION_SERVICES, TOGGLE_WIFI, TOUCH_ID, TOUCH_ID_ENROLLMENT, UNLOCK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.fingerPrintCommand(int fingerPrintId) Deprecated.Deprecated.Deprecated.getPerformanceDataCommand(String packageName, String dataType, int dataReadTimeout) returns the resource usage information of the application.returns the information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.Deprecated.gsmCallCommand(String phoneNumber, GsmCallActions gsmCallActions) Deprecated.gsmSignalStrengthCommand(GsmSignalStrength gsmSignalStrength) Deprecated.gsmVoiceCommand(GsmVoiceState gsmVoiceState) Deprecated.Deprecated.networkSpeedCommand(NetworkSpeed networkSpeed) Deprecated.Deprecated.powerACCommand(PowerACState powerACState) Deprecated.powerCapacityCommand(int percent) Deprecated.replaceElementValueCommand(org.openqa.selenium.remote.RemoteWebElement remoteWebElement, String value) Deprecated.sendSMSCommand(String phoneNumber, String message) Deprecated.setConnectionCommand(long bitMask) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Methods inherited from class io.appium.java_client.MobileCommand
compareImagesCommand, deleteC, getC, getIsDeviceLockedCommand, getSettingsCommand, hideKeyboardCommand, hideKeyboardCommand, isKeyboardShownCommand, lockDeviceCommand, longPressKeyCodeCommand, longPressKeyCodeCommand, postC, prepareArguments, prepareArguments, pressKeyCodeCommand, pressKeyCodeCommand, pushFileCommand, setSettingsCommand, setSettingsCommand, startRecordingScreenCommand, stopRecordingScreenCommand, unlockDeviceCommand
-
Constructor Details
-
AndroidMobileCommandHelper
public AndroidMobileCommandHelper()
-
-
Method Details
-
currentActivityCommand
Deprecated.This method forms aMapof parameters for the getting of the current activity.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
currentPackageCommand
Deprecated.This method forms aMapof parameters for the getting of the current package.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
getSupportedPerformanceDataTypesCommand
returns the information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.- Returns:
- output - array like below [cpuinfo, batteryinfo, networkinfo, memoryinfo]
-
getPerformanceDataCommand
public static Map.Entry<String,Map<String, getPerformanceDataCommand?>> (String packageName, String dataType, int dataReadTimeout) returns the resource usage information of the application. the resource is one of the system state which means cpu, memory, network traffic, and battery.- Parameters:
packageName- the package name of the applicationdataType- the type of system state which wants to read. It should be one of the supported performance data types, the return value of the function "getSupportedPerformanceDataTypes"dataReadTimeout- the number of attempts to read- Returns:
- table of the performance data, The first line of the table represents the type of data. The remaining lines represent the values of the data. in case of battery info : [[power], [23]] in case of memory info : [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] in case of network info : [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] in case of network info : [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] in case of cpu info : [[user, kernel], [0.9, 1.3]]
-
getDisplayDensityCommand
Deprecated.This method forms aMapof parameters to retrieve the display density of the Android device.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
getNetworkConnectionCommand
Deprecated.This method forms aMapof parameters for the getting of a network connection value.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
getSystemBarsCommand
Deprecated.This method forms aMapof parameters to retrieve visibility and bounds information of the status and navigation bars.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
isLockedCommand
Deprecated.This method forms aMapof parameters for the finger print authentication invocation.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
fingerPrintCommand
Deprecated.This method forms aMapof parameters for the finger print authentication invocation.- Parameters:
fingerPrintId- finger prints stored in Android Keystore system (from 1 to 10)- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
openNotificationsCommand
Deprecated.This method forms aMapof parameters for the notification opening.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
setConnectionCommand
Deprecated.This method forms aMapof parameters for the setting of device network connection.- Parameters:
bitMask- The bitmask of the desired connection- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
toggleLocationServicesCommand
Deprecated.This method forms aMapof parameters for the toggling of location services.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
unlockCommand
Deprecated.This method forms aMapof parameters for the element.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
replaceElementValueCommand
@Deprecated public static Map.Entry<String,Map<String, replaceElementValueCommand?>> (org.openqa.selenium.remote.RemoteWebElement remoteWebElement, String value) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
remoteWebElement- an instance which contains an element IDvalue- a new value- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
sendSMSCommand
@Deprecated public static Map.Entry<String,Map<String, sendSMSCommand?>> (String phoneNumber, String message) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
phoneNumber- The phone number of message sendermessage- The message content- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
gsmCallCommand
@Deprecated public static Map.Entry<String,Map<String, gsmCallCommand?>> (String phoneNumber, GsmCallActions gsmCallActions) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
phoneNumber- The phone number of message sendergsmCallActions- One of available GSM call actions- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
gsmSignalStrengthCommand
@Deprecated public static Map.Entry<String,Map<String, gsmSignalStrengthCommand?>> (GsmSignalStrength gsmSignalStrength) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
gsmSignalStrength- One of available GSM signal strength- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
gsmVoiceCommand
@Deprecated public static Map.Entry<String,Map<String, gsmVoiceCommand?>> (GsmVoiceState gsmVoiceState) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
gsmVoiceState- One of available GSM voice state- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
networkSpeedCommand
@Deprecated public static Map.Entry<String,Map<String, networkSpeedCommand?>> (NetworkSpeed networkSpeed) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
networkSpeed- One of possible NETWORK_SPEED values- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
powerCapacityCommand
Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
percent- A number in range [0, 4]- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
powerACCommand
Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
powerACState- One of available power AC state- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
toggleWifiCommand
Deprecated.This method forms aMapof parameters for the toggling of wifi.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
toggleAirplaneCommand
Deprecated.This method forms aMapof parameters for the toggle airplane mode.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-
toggleDataCommand
Deprecated.This method forms aMapof parameters for the toggle data.- Returns:
- a key-value pair. The key is the command name. The value is a
Mapcommand arguments.
-