public class MobileCommand
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ACTIVATE_APP |
protected static java.lang.String |
CLOSE_APP |
static java.util.Map<java.lang.String,org.openqa.selenium.remote.CommandInfo> |
commandRepository |
protected static java.lang.String |
COMPARE_IMAGES |
protected static java.lang.String |
CURRENT_ACTIVITY |
protected static java.lang.String |
END_TEST_COVERAGE |
protected static java.lang.String |
FINGER_PRINT |
static java.lang.String |
GET_CLIPBOARD |
protected static java.lang.String |
GET_CURRENT_PACKAGE |
protected static java.lang.String |
GET_DEVICE_TIME |
protected static java.lang.String |
GET_DISPLAY_DENSITY |
protected static java.lang.String |
GET_NETWORK_CONNECTION |
protected static java.lang.String |
GET_PERFORMANCE_DATA |
protected static java.lang.String |
GET_SESSION |
protected static java.lang.String |
GET_SETTINGS |
protected static java.lang.String |
GET_STRINGS |
protected static java.lang.String |
GET_SUPPORTED_PERFORMANCE_DATA_TYPES |
protected static java.lang.String |
GET_SYSTEM_BARS |
protected static java.lang.String |
GSM_CALL |
protected static java.lang.String |
GSM_SIGNAL |
protected static java.lang.String |
GSM_VOICE |
protected static java.lang.String |
HIDE_KEYBOARD |
protected static java.lang.String |
INSTALL_APP |
protected static java.lang.String |
IS_APP_INSTALLED |
protected static java.lang.String |
IS_KEYBOARD_SHOWN |
protected static java.lang.String |
IS_LOCKED |
protected static java.lang.String |
LAUNCH_APP |
protected static java.lang.String |
LOCK |
static java.lang.String |
LONG_PRESS_KEY_CODE |
protected static java.lang.String |
NETWORK_SPEED |
protected static java.lang.String |
OPEN_NOTIFICATIONS |
protected static java.lang.String |
PERFORM_MULTI_TOUCH |
protected static java.lang.String |
PERFORM_TOUCH_ACTION |
protected static java.lang.String |
POWER_AC_STATE |
protected static java.lang.String |
POWER_CAPACITY |
static java.lang.String |
PRESS_KEY_CODE |
protected static java.lang.String |
PULL_FILE |
protected static java.lang.String |
PULL_FOLDER |
protected static java.lang.String |
PUSH_FILE |
protected static java.lang.String |
QUERY_APP_STATE |
protected static java.lang.String |
REMOVE_APP |
protected static java.lang.String |
REPLACE_VALUE |
protected static java.lang.String |
RESET |
static java.lang.String |
RUN_APP_IN_BACKGROUND |
protected static java.lang.String |
SEND_SMS |
static java.lang.String |
SET_CLIPBOARD |
protected static java.lang.String |
SET_NETWORK_CONNECTION |
protected static java.lang.String |
SET_SETTINGS |
protected static java.lang.String |
SET_VALUE |
protected static java.lang.String |
SHAKE |
protected static java.lang.String |
START_ACTIVITY |
static java.lang.String |
START_RECORDING_SCREEN |
static java.lang.String |
STOP_RECORDING_SCREEN |
protected static java.lang.String |
TERMINATE_APP |
protected static java.lang.String |
TOGGLE_AIRPLANE_MODE |
protected static java.lang.String |
TOGGLE_DATA |
protected static java.lang.String |
TOGGLE_LOCATION_SERVICES |
protected static java.lang.String |
TOGGLE_WIFI |
protected static java.lang.String |
TOUCH_ID |
protected static java.lang.String |
TOUCH_ID_ENROLLMENT |
protected static java.lang.String |
UNLOCK |
Constructor and Description |
---|
MobileCommand() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
compareImagesCommand(ComparisonMode mode,
byte[] img1Data,
byte[] img2Data,
BaseComparisonOptions options)
Forms a
Map of parameters for images comparison. |
static AppiumCommandInfo |
deleteC(java.lang.String url)
This methods forms DELETE commands.
|
static AppiumCommandInfo |
getC(java.lang.String url)
This methods forms GET commands.
|
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getIsDeviceLockedCommand()
This method forms a
Map of parameters for the
device locked query. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
getSettingsCommand() |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
hideKeyboardCommand(java.lang.String keyName)
This method forms a
Map of parameters for the
keyboard hiding. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
hideKeyboardCommand(java.lang.String strategy,
java.lang.String keyName)
This method forms a
Map of parameters for the
keyboard hiding. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
isKeyboardShownCommand()
This method forms a
Map of parameters for the checking of the keyboard state (is it shown or not). |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
lockDeviceCommand(java.time.Duration duration)
This method forms a
Map of parameters for the
device locking. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
longPressKeyCodeCommand(int key)
This method forms a
Map of parameters for the
long key event invocation. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
longPressKeyCodeCommand(int key,
java.lang.Integer metastate)
This method forms a
Map of parameters for the
long key event invocation. |
static AppiumCommandInfo |
postC(java.lang.String url)
This methods forms POST commands.
|
static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Object> |
prepareArguments(java.lang.String[] params,
java.lang.Object[] values)
Prepares collection of arguments.
|
static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Object> |
prepareArguments(java.lang.String param,
java.lang.Object value)
Prepares single argument.
|
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
pressKeyCodeCommand(int key)
This method forms a
Map of parameters for the
key event invocation. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
pressKeyCodeCommand(int key,
java.lang.Integer metastate)
This method forms a
Map of parameters for the
key event invocation. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
pushFileCommand(java.lang.String remotePath,
byte[] base64Data)
This method forms a
Map of parameters for the
file pushing. |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
setSettingsCommand(Setting setting,
java.lang.Object value) |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
startRecordingScreenCommand(BaseStartScreenRecordingOptions opts) |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
stopRecordingScreenCommand(BaseStopScreenRecordingOptions opts) |
static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> |
unlockDeviceCommand()
This method forms a
Map of parameters for the
device unlocking. |
protected static final java.lang.String RESET
protected static final java.lang.String GET_STRINGS
protected static final java.lang.String SET_VALUE
protected static final java.lang.String PULL_FILE
protected static final java.lang.String PULL_FOLDER
public static final java.lang.String RUN_APP_IN_BACKGROUND
protected static final java.lang.String PERFORM_TOUCH_ACTION
protected static final java.lang.String PERFORM_MULTI_TOUCH
protected static final java.lang.String LAUNCH_APP
protected static final java.lang.String CLOSE_APP
protected static final java.lang.String GET_DEVICE_TIME
protected static final java.lang.String GET_SESSION
protected static final java.lang.String IS_APP_INSTALLED
protected static final java.lang.String INSTALL_APP
protected static final java.lang.String ACTIVATE_APP
protected static final java.lang.String QUERY_APP_STATE
protected static final java.lang.String TERMINATE_APP
protected static final java.lang.String REMOVE_APP
public static final java.lang.String GET_CLIPBOARD
public static final java.lang.String SET_CLIPBOARD
protected static final java.lang.String GET_PERFORMANCE_DATA
protected static final java.lang.String GET_SUPPORTED_PERFORMANCE_DATA_TYPES
public static final java.lang.String START_RECORDING_SCREEN
public static final java.lang.String STOP_RECORDING_SCREEN
protected static final java.lang.String HIDE_KEYBOARD
protected static final java.lang.String LOCK
protected static final java.lang.String SHAKE
protected static final java.lang.String TOUCH_ID
protected static final java.lang.String TOUCH_ID_ENROLLMENT
protected static final java.lang.String CURRENT_ACTIVITY
protected static final java.lang.String END_TEST_COVERAGE
protected static final java.lang.String GET_DISPLAY_DENSITY
protected static final java.lang.String GET_NETWORK_CONNECTION
protected static final java.lang.String GET_SYSTEM_BARS
protected static final java.lang.String IS_KEYBOARD_SHOWN
protected static final java.lang.String IS_LOCKED
public static final java.lang.String LONG_PRESS_KEY_CODE
protected static final java.lang.String FINGER_PRINT
protected static final java.lang.String OPEN_NOTIFICATIONS
public static final java.lang.String PRESS_KEY_CODE
protected static final java.lang.String PUSH_FILE
protected static final java.lang.String SET_NETWORK_CONNECTION
protected static final java.lang.String START_ACTIVITY
protected static final java.lang.String TOGGLE_LOCATION_SERVICES
protected static final java.lang.String UNLOCK
protected static final java.lang.String REPLACE_VALUE
protected static final java.lang.String GET_SETTINGS
protected static final java.lang.String SET_SETTINGS
protected static final java.lang.String GET_CURRENT_PACKAGE
protected static final java.lang.String SEND_SMS
protected static final java.lang.String GSM_CALL
protected static final java.lang.String GSM_SIGNAL
protected static final java.lang.String GSM_VOICE
protected static final java.lang.String NETWORK_SPEED
protected static final java.lang.String POWER_CAPACITY
protected static final java.lang.String POWER_AC_STATE
protected static final java.lang.String TOGGLE_WIFI
protected static final java.lang.String TOGGLE_AIRPLANE_MODE
protected static final java.lang.String TOGGLE_DATA
protected static final java.lang.String COMPARE_IMAGES
public static final java.util.Map<java.lang.String,org.openqa.selenium.remote.CommandInfo> commandRepository
public static AppiumCommandInfo getC(java.lang.String url)
url
- is the command URLCommandInfo
public static AppiumCommandInfo postC(java.lang.String url)
url
- is the command URLCommandInfo
public static AppiumCommandInfo deleteC(java.lang.String url)
url
- is the command URLCommandInfo
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> hideKeyboardCommand(java.lang.String keyName)
Map
of parameters for the
keyboard hiding.keyName
- The button pressed by the mobile driver to attempt hiding the
keyboard.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> hideKeyboardCommand(java.lang.String strategy, java.lang.String keyName)
Map
of parameters for the
keyboard hiding.strategy
- HideKeyboardStrategy.keyName
- a String, representing the text displayed on the button of the
keyboard you want to press. For example: "Done".Map
command arguments.public static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Object> prepareArguments(java.lang.String param, java.lang.Object value)
param
- is a parameter name.value
- is the parameter value.ImmutableMap
.public static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Object> prepareArguments(java.lang.String[] params, java.lang.Object[] values)
params
- is the array with parameter names.values
- is the array with parameter values.ImmutableMap
.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> pressKeyCodeCommand(int key)
Map
of parameters for the
key event invocation.key
- code for the key pressed on the device.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> pressKeyCodeCommand(int key, java.lang.Integer metastate)
Map
of parameters for the
key event invocation.key
- code for the key pressed on the Android device.metastate
- metastate for the keypress.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> longPressKeyCodeCommand(int key)
Map
of parameters for the
long key event invocation.key
- code for the long key pressed on the device.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> longPressKeyCodeCommand(int key, java.lang.Integer metastate)
Map
of parameters for the
long key event invocation.key
- code for the long key pressed on the Android device.metastate
- metastate for the long key press.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> lockDeviceCommand(java.time.Duration duration)
Map
of parameters for the
device locking.duration
- for how long to lock the screen for. Minimum time resolution is one secondMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> unlockDeviceCommand()
Map
of parameters for the
device unlocking.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getIsDeviceLockedCommand()
Map
of parameters for the
device locked query.Map
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getSettingsCommand()
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> setSettingsCommand(Setting setting, java.lang.Object value)
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> pushFileCommand(java.lang.String remotePath, byte[] base64Data)
Map
of parameters for the
file pushing.remotePath
- Path to file to write data to on remote devicebase64Data
- Base64 encoded byte array of data to write to remote deviceMap
command arguments.public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> startRecordingScreenCommand(BaseStartScreenRecordingOptions opts)
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> stopRecordingScreenCommand(BaseStopScreenRecordingOptions opts)
public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> compareImagesCommand(ComparisonMode mode, byte[] img1Data, byte[] img2Data, @Nullable BaseComparisonOptions options)
Map
of parameters for images comparison.mode
- one of possible comparison modesimg1Data
- base64-encoded data of the first imageimg2Data
- base64-encoded data of the second imageoptions
- comparison optionspublic static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> isKeyboardShownCommand()
Map
of parameters for the checking of the keyboard state (is it shown or not).Map
command arguments.