AndroidKeyAndroidKey.AAndroidKey.ALT_LEFTAndroidKey.ALT_RIGHTAndroidKey.APOSTROPHEAndroidKey.APP_SWITCHAndroidKey.ASSISTAndroidKey.ATAndroidKey.AVR_INPUTAndroidKey.AVR_POWERAndroidKey.BAndroidKey.BACKAndroidKey.BACKSLASHAndroidKey.BOOKMARKAndroidKey.BREAKAndroidKey.BRIGHTNESS_DOWNAndroidKey.BRIGHTNESS_UPAndroidKey.BUTTON_1AndroidKey.BUTTON_10AndroidKey.BUTTON_11AndroidKey.BUTTON_12AndroidKey.BUTTON_13AndroidKey.BUTTON_14AndroidKey.BUTTON_15AndroidKey.BUTTON_16AndroidKey.BUTTON_2AndroidKey.BUTTON_3AndroidKey.BUTTON_4AndroidKey.BUTTON_5AndroidKey.BUTTON_6AndroidKey.BUTTON_7AndroidKey.BUTTON_8AndroidKey.BUTTON_9AndroidKey.BUTTON_AAndroidKey.BUTTON_BAndroidKey.BUTTON_CAndroidKey.BUTTON_L1AndroidKey.BUTTON_L2AndroidKey.BUTTON_MODEAndroidKey.BUTTON_R1AndroidKey.BUTTON_R2AndroidKey.BUTTON_SELECTAndroidKey.BUTTON_STARTAndroidKey.BUTTON_THUMBLAndroidKey.BUTTON_THUMBRAndroidKey.BUTTON_XAndroidKey.BUTTON_YAndroidKey.BUTTON_ZAndroidKey.CAndroidKey.CALCULATORAndroidKey.CALENDARAndroidKey.CALLAndroidKey.CAMERAAndroidKey.CAPS_LOCKAndroidKey.CAPTIONSAndroidKey.CHANNEL_DOWNAndroidKey.CHANNEL_UPAndroidKey.CLEARAndroidKey.COMMAAndroidKey.CONTACTSAndroidKey.COPYAndroidKey.CTRL_LEFTAndroidKey.CTRL_RIGHTAndroidKey.CUTAndroidKey.DAndroidKey.DELAndroidKey.DIGIT_0AndroidKey.DIGIT_1AndroidKey.DIGIT_2AndroidKey.DIGIT_3AndroidKey.DIGIT_4AndroidKey.DIGIT_5AndroidKey.DIGIT_6AndroidKey.DIGIT_7AndroidKey.DIGIT_8AndroidKey.DIGIT_9AndroidKey.DPAD_CENTERAndroidKey.DPAD_DOWNAndroidKey.DPAD_DOWN_LEFTAndroidKey.DPAD_DOWN_RIGHTAndroidKey.DPAD_LEFTAndroidKey.DPAD_RIGHTAndroidKey.DPAD_UPAndroidKey.DPAD_UP_LEFTAndroidKey.DPAD_UP_RIGHTAndroidKey.DVRAndroidKey.EAndroidKey.EISUAndroidKey.ENDCALLAndroidKey.ENTERAndroidKey.ENVELOPEAndroidKey.EQUALSAndroidKey.ESCAPEAndroidKey.EXPLORERAndroidKey.FAndroidKey.F1AndroidKey.F10AndroidKey.F11AndroidKey.F12AndroidKey.F2AndroidKey.F3AndroidKey.F4AndroidKey.F5AndroidKey.F6AndroidKey.F7AndroidKey.F8AndroidKey.F9AndroidKey.FOCUSAndroidKey.FORWARDAndroidKey.FORWARD_DELAndroidKey.FUNCTIONAndroidKey.GAndroidKey.GRAVEAndroidKey.GUIDEAndroidKey.HAndroidKey.HEADSETHOOKAndroidKey.HELPAndroidKey.HENKANAndroidKey.HOMEAndroidKey.IAndroidKey.INFOAndroidKey.INSERTAndroidKey.JAndroidKey.KAndroidKey.KANAAndroidKey.KATAKANA_HIRAGANAAndroidKey.KEYCODE_ZOOM_INAndroidKey.KEYCODE_ZOOM_OUTAndroidKey.KEY_11AndroidKey.KEY_12AndroidKey.LAndroidKey.LANGUAGE_SWITCHAndroidKey.LAST_CHANNELAndroidKey.LEFT_BRACKETAndroidKey.MAndroidKey.MANNER_MODEAndroidKey.MEDIA_AUDIO_TRACKAndroidKey.MEDIA_CLOSEAndroidKey.MEDIA_EJECTAndroidKey.MEDIA_FAST_FORWARDAndroidKey.MEDIA_NEXTAndroidKey.MEDIA_PAUSEAndroidKey.MEDIA_PLAYAndroidKey.MEDIA_PLAY_PAUSEAndroidKey.MEDIA_PREVIOUSAndroidKey.MEDIA_RECORDAndroidKey.MEDIA_REWINDAndroidKey.MEDIA_SKIP_BACKWARDAndroidKey.MEDIA_SKIP_FORWARDAndroidKey.MEDIA_STEP_BACKWARDAndroidKey.MEDIA_STEP_FORWARDAndroidKey.MEDIA_STOPAndroidKey.MEDIA_TOP_MENUAndroidKey.MENUAndroidKey.META_LEFTAndroidKey.META_RIGHTAndroidKey.MINUSAndroidKey.MODE_3DAndroidKey.MOVE_ENDAndroidKey.MOVE_HOMEAndroidKey.MUHENKANAndroidKey.MUSICAndroidKey.MUTEAndroidKey.NAndroidKey.NAVIGATE_INAndroidKey.NAVIGATE_NEXTAndroidKey.NAVIGATE_OUTAndroidKey.NAVIGATE_PREVIOUSAndroidKey.NOTIFICATIONAndroidKey.NUMAndroidKey.NUMPAD_0AndroidKey.NUMPAD_1AndroidKey.NUMPAD_2AndroidKey.NUMPAD_3AndroidKey.NUMPAD_4AndroidKey.NUMPAD_5AndroidKey.NUMPAD_6AndroidKey.NUMPAD_7AndroidKey.NUMPAD_8AndroidKey.NUMPAD_9AndroidKey.NUMPAD_ADDAndroidKey.NUMPAD_COMMAAndroidKey.NUMPAD_DIVIDEAndroidKey.NUMPAD_DOTAndroidKey.NUMPAD_ENTERAndroidKey.NUMPAD_EQUALSAndroidKey.NUMPAD_LEFT_PARENAndroidKey.NUMPAD_MULTIPLYAndroidKey.NUMPAD_RIGHT_PARENAndroidKey.NUMPAD_SUBTRACTAndroidKey.NUM_LOCKAndroidKey.OAndroidKey.PAndroidKey.PAGE_DOWNAndroidKey.PAGE_UPAndroidKey.PAIRINGAndroidKey.PERIODAndroidKey.PICTSYMBOLSAndroidKey.PLUSAndroidKey.POUNDAndroidKey.POWERAndroidKey.PROG_BLUEAndroidKey.PROG_GREENAndroidKey.PROG_REDAndroidKey.PROG_YELLOWAndroidKey.QAndroidKey.RAndroidKey.RIGHT_BRACKETAndroidKey.ROAndroidKey.SAndroidKey.SCROLL_LOCKAndroidKey.SEARCHAndroidKey.SEMICOLONAndroidKey.SETTINGSAndroidKey.SHIFT_LEFTAndroidKey.SHIFT_RIGHTAndroidKey.SLASHAndroidKey.SLEEPAndroidKey.SOFT_LEFTAndroidKey.SOFT_RIGHTAndroidKey.SOFT_SLEEPAndroidKey.SPACEAndroidKey.STARAndroidKey.STB_INPUTAndroidKey.STB_POWERAndroidKey.STEM_1AndroidKey.STEM_2AndroidKey.STEM_3AndroidKey.STEM_PRIMARYAndroidKey.SWITCH_CHARSETAndroidKey.SYMAndroidKey.SYSRQAndroidKey.TAndroidKey.TABAndroidKey.TVAndroidKey.TV_ANTENNA_CABLEAndroidKey.TV_AUDIO_DESCRIPTIONAndroidKey.TV_AUDIO_DESCRIPTION_MIX_DOWNAndroidKey.TV_AUDIO_DESCRIPTION_MIX_UPAndroidKey.TV_CONTENTS_MENUAndroidKey.TV_DATA_SERVICEAndroidKey.TV_INPUTAndroidKey.TV_INPUT_COMPONENT_1AndroidKey.TV_INPUT_COMPONENT_2AndroidKey.TV_INPUT_COMPOSITE_1AndroidKey.TV_INPUT_COMPOSITE_2AndroidKey.TV_INPUT_HDMI_1AndroidKey.TV_INPUT_HDMI_2AndroidKey.TV_INPUT_HDMI_3AndroidKey.TV_INPUT_HDMI_4AndroidKey.TV_INPUT_VGA_1AndroidKey.TV_MEDIA_CONTEXT_MENUAndroidKey.TV_NETWORKAndroidKey.TV_NUMBER_ENTRYAndroidKey.TV_POWERAndroidKey.TV_RADIO_SERVICEAndroidKey.TV_SATELLITEAndroidKey.TV_SATELLITE_BSAndroidKey.TV_SATELLITE_CSAndroidKey.TV_SATELLITE_SERVICEAndroidKey.TV_TELETEXTAndroidKey.TV_TERRESTRIAL_ANALOGAndroidKey.TV_TERRESTRIAL_DIGITALAndroidKey.TV_TIMER_PROGRAMMINGAndroidKey.TV_ZOOM_MODEAndroidKey.UAndroidKey.UNKNOWNAndroidKey.VAndroidKey.VOICE_ASSISTAndroidKey.VOLUME_DOWNAndroidKey.VOLUME_MUTEAndroidKey.VOLUME_UPAndroidKey.WAndroidKey.WAKEUPAndroidKey.WINDOWAndroidKey.XAndroidKey.YAndroidKey.YENAndroidKey.ZAndroidKey.ZENKAKU_HANKAKUAndroidKey.confirm_buttonsAndroidKey.gamepad_buttonsAndroidKey.is_confirm_key()AndroidKey.is_gamepad_button()AndroidKey.is_media_key()AndroidKey.is_system_key()AndroidKey.is_wake_key()AndroidKey.media_buttonsAndroidKey.system_buttonsAndroidKey.wake_buttonsFlutterCommandFlutterCommand.activate_injected_image()FlutterCommand.execute_flutter_command()FlutterCommand.get_render_tree()FlutterCommand.inject_mock_image()FlutterCommand.perform_double_click()FlutterCommand.perform_drag_and_drop()FlutterCommand.perform_long_press()FlutterCommand.scroll_till_visible()FlutterCommand.wait_for_invisible()FlutterCommand.wait_for_visible()Bases: object
Drag the origin element to the destination element
origin_el – the element to drag
destination_el – the element to drag to
pause – how long the action pauses before moving after the tap and hold, in float seconds.
Self instance
Union[‘WebDriver’, ‘ActionHelpers’]
Flick from one point to another point.
start_x – x-coordinate at which to start
start_y – y-coordinate at which to start
end_x – x-coordinate at which to stop
end_y – y-coordinate at which to stop
driver.flick(100, 100, 100, 400)
Self instance
Union[‘WebDriver’, ‘ActionHelpers’]
Scrolls from one element to another
origin_el – the element from which to begin scrolling (center of element)
destination_el – the element to scroll to (center of element)
duration – defines speed of scroll action when moving from originalEl to destinationEl. Default is 600 ms for W3C spec.
driver.scroll(el1, el2)
Self instance
Union[‘WebDriver’, ‘ActionHelpers’]
Swipe from one point to another point, for an optional duration.
start_x – x-coordinate at which to start
start_y – y-coordinate at which to start
end_x – x-coordinate at which to stop
end_y – y-coordinate at which to stop
duration – defines the swipe speed as time taken to swipe from point a to point b, in ms.
driver.swipe(100, 100, 100, 400)
Self instance
Union[‘WebDriver’, ‘ActionHelpers’]
Taps on an particular place with up to five fingers, holding for a certain time
positions – an array of tuples representing the x/y coordinates of the fingers to tap. Length can be up to five.
duration – length of time to tap, in ms
driver.tap([(100, 20), (100, 60), (100, 100)], 500)
Self instance
Union[‘WebDriver’, ‘ActionHelpers’]
Bases: CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence
Activates the application if it is not running or is running in the background.
app_id – the application id to be activated
Self instance
Union[‘WebDriver’, ‘Applications’]
Returns the application strings from the device for the specified language.
language – strings language code
string_file – the name of the string file to query. Only relevant for XCUITest driver
The key is string id and the value is the content.
Puts the application in the background on the device for a certain duration.
seconds – the duration for the application to remain in the background.
app (Providing a negative value will continue immediately after putting the)
background. (under test to the)
Self instance
Union[‘WebDriver’, ‘Applications’]
Install the application found at app_path on the device.
app_path – the local or remote path to the application to install
replace (bool) – [Android only] whether to reinstall/upgrade the package if it is already present on the device under test. True by default
timeout (int) – [Android only] how much time to wait for the installation to complete. 60000ms by default.
allowTestPackages (bool) – [Android only] whether to allow installation of packages marked as test in the manifest. False by default
useSdcard (bool) – [Android only] whether to use the SD card to install the app. False by default
grantPermissions (bool) – [Android only] whether to automatically grant application permissions on Android 6+ after the installation completes. False by default
Self instance
Union[‘WebDriver’, ‘Applications’]
Checks whether the application specified by bundle_id is installed on the device.
bundle_id – the id of the application to query
True if app is installed
Queries the state of the application.
app_id – the application id to be queried
One of possible application state constants. See ApplicationState class for more details.
Remove the specified application from the device.
app_id – the application id to be removed
keepData (bool) – [Android only] whether to keep application data and caches after it is uninstalled. False by default
timeout (int) – [Android only] how much time to wait for the uninstall to complete. 20000ms by default.
Self instance
Union[‘WebDriver’, ‘Applications’]
Terminates the application if it is running.
app_id – the application id to be terminates
timeout (int) – [Android only] how much time to wait for the uninstall to complete. 500ms by default.
True if the app has been successfully terminated
Bases: CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence
Receives the content of the system clipboard
content_type – One of ClipboardContentType items. Only ClipboardContentType.PLAINTEXT is supported on Android
Clipboard content as bytearray. Or empty bytes if the clipboard is empty
Receives the text of the system clipboard
The actual clipboard text or an empty string if the clipboard is empty
Set the content of the system clipboard
content – The content to be set as bytearray string
content_type – One of ClipboardContentType items. Only ClipboardContentType.PLAINTEXT is supported on Android
label – label argument, which only works for Android
Self instance
Union[‘WebDriver’, ‘Clipboard’]
Copies the given text to the system clipboard
text – The text to be set
label – label argument, which only works for Android
Self instance
Union[‘WebDriver’, ‘Clipboard’]
Bases: CanExecuteCommands
Returns the current context of the current session.
driver.context
The context of the current session
str
Returns the contexts within the current session.
driver.contexts
The contexts within the current session
list of str
Returns the current context of the current session.
driver.current_context
The context of the current session
str
Bases: CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence
Returns the date and time from the device.
The date and time
str
Returns the date and time from the device.
format – The set of format specifiers. Read https://momentjs.com/docs/
to get the full list of supported datetime format specifiers.
If unset, return device_time() as default format is YYYY-MM-DDTHH:mm:ssZ,
which complies to ISO-8601
The date and time
str
Bases: CanExecuteCommands
Run a set of script against the current session, allowing execution of many commands in one Appium request. Please read http://appium.io/docs/en/commands/session/execute-driver for more details about the acceptable scripts and the output format.
script – The string consisting of the script itself
script_type – The name of the script type. Defaults to ‘webdriverio’.
timeout_ms – The number of ms Appium should wait for the script to finish before killing it due to timeout_ms.
The result of the script. It has ‘result’ and ‘logs’ keys.
ExecuteDriver.Result
WebDriverException – If something error happens in the script. The message has the original error message.
Bases: CanExecuteScripts
Retrieves battery information for the device under test.
Any value lower than 0 means the level cannot be retrieved
1: Unplugged 2: Charging 3: Full Any other value means the state cannot be retrieved
2: Charging 3: Discharging 4: Not charging 5: Full Any other value means the state cannot be retrieved
dict
Sends a physical button name to the device to simulate the user pressing.
iOS only. Possible button names can be found in https://github.com/appium/WebDriverAgent/blob/master/WebDriverAgentLib/Categories/XCUIDevice%2BFBHelpers.h
button_name – the button name to be sent to the device
Self instance
Union[‘WebDriver’, ‘ExecuteMobileCommand’]
Bases: CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence
Authenticate users by using their finger print scans on supported Android emulators.
finger_id – Finger prints stored in Android Keystore system (from 1 to 10)
Checks whether the device is locked.
True if the device is locked
Lock the device. No changes are made if the device is already unlocked.
seconds – The duration to lock the device, in seconds. The device is going to be locked forever until unlock is called if it equals or is less than zero, otherwise this call blocks until the timeout expires and unlocks the screen automatically.
Self instance
Union[‘WebDriver’, ‘HardwareActions’]
Shake the device.
Self instance
Union[‘WebDriver’, ‘HardwareActions’]
Toggle enroll touchId on iOS Simulator
Self instance
Union[‘WebDriver’, ‘HardwareActions’]
Simulate touchId on iOS Simulator
match – Simulates a successful touch (True) or a failed touch (False)
Self instance
Union[‘WebDriver’, ‘HardwareActions’]
Unlock the device. No changes are made if the device is already locked.
Self instance
Union[‘WebDriver’, ‘HardwareActions’]
Bases: CanExecuteCommands
Performs images matching by template to find possible occurrence of the partial image in the full image.
Read https://docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matching.html for more details on this topic. The method supports all image formats, which are supported by OpenCV itself.
base64_full_image – base64-encoded content of the full image
base64_partial_image – base64-encoded content of the partial image
visualize (bool) – Set it to True in order to return the visualization of the matching operation. False by default
operation. This entry is only present if visualize option is enabled
The rect is represented by a dictionary with ‘x’, ‘y’, ‘width’ and ‘height’ keys
The dictionary containing the following entries
Performs images matching to calculate the similarity score between them.
The flow there is similar to the one used in find_image_occurrence, but it is mandatory that both images are of equal resolution. The method supports all image formats, which are supported by OpenCV itself.
base64_image1 – base64-encoded content of the first image
base64_image2 – base64-encoded content of the second image
visualize (boo) – Set it to True in order to return the visualization of the matching operation. False by default
operation. This entry is only present if visualize option is enabled
1.0 is the highest score (means both images are totally equal).
The dictionary containing the following entries
Performs images matching by features.
Read https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html for more details on this topic. The method supports all image formats, which are supported by OpenCV itself.
base64_image1 – base64-encoded content of the first image
base64_image2 – base64-encoded content of the second image
visualize (bool) – Set it to True in order to return the visualization of the matching operation. matching visualization. False by default
detectorName (str) – One of possible feature detector names: ‘AKAZE’, ‘AGAST’, ‘BRISK’, ‘FAST’, ‘GFTT’, ‘KAZE’, ‘MSER’, ‘SIFT’, ‘ORB’ Some of these detectors are not enabled in the default OpenCV deployment. ‘ORB’ By default.
matchFunc (str) – One of supported matching functions names: ‘FlannBased’, ‘BruteForce’, ‘BruteForceL1’, ‘BruteForceHamming’, ‘BruteForceHammingLut’, ‘BruteForceSL2’ ‘BruteForce’ by default
goodMatchesFactor (int) – The maximum count of “good” matches (e. g. with minimal distances). This count is unlimited by default.
operation. This entry is only present if visualize option is enabled
The more matching edges there are no both images the more similar they are.
It is equal to count if goodMatchesFactor does not limit the matches, otherwise it contains the total count of matches before goodMatchesFactor is applied.
with ‘x’ and ‘y’ keys
were found. The rect is represented by a dictionary with ‘x’, ‘y’, ‘width’ and ‘height’ keys
with ‘x’ and ‘y’ keys
were found. The rect is represented by a dictionary with ‘x’, ‘y’, ‘width’ and ‘height’ keys
The dictionary containing the following entries
Bases: CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence
Hides the software keyboard on the device.
In iOS, use key_name to press a particular key, or strategy. In Android, no parameters are used.
key_name – key to press
key
strategy – strategy for closing the keyboard (e.g., tapOutside)
Self instance
Union[‘WebDriver’, ‘Keyboard’]
Attempts to detect whether a software keyboard is present
True if keyboard is shown
Sends a keycode to the device.
Android only. Possible keycodes can be found in http://developer.android.com/reference/android/view/KeyEvent.html.
keycode – the keycode to be sent to the device
metastate – meta information about the keycode being sent
Self instance
Union[‘WebDriver’, ‘Keyboard’]
Sends a long press of keycode to the device.
Android only. Possible keycodes can be found in http://developer.android.com/reference/android/view/KeyEvent.html.
keycode – the keycode to be sent to the device
metastate – meta information about the keycode being sent
flags – the set of key event flags
Self instance
Union[‘WebDriver’, ‘Keyboard’]
Sends a keycode to the device.
Android only. Possible keycodes can be found in http://developer.android.com/reference/android/view/KeyEvent.html.
keycode – the keycode to be sent to the device
metastate – meta information about the keycode being sent
flags – the set of key event flags
Self instance
Union[‘WebDriver’, ‘Keyboard’]
Bases: CanExecuteCommands, CanExecuteScripts
Retrieves the current location
latitude (float)
longitude (float)
altitude (float)
Set the location of the device
latitude – String or numeric value between -90.0 and 90.00
longitude – String or numeric value between -180.0 and 180.0
altitude – String or numeric value (Android real device only)
speed – String or numeric value larger than 0.0 (Android real devices only)
satellites – String or numeric value of active GPS satellites in range 1..12. (Android emulators only)
Self instance
Union[‘WebDriver’, ‘Location’]
Toggle the location services on the device. This API only reliably since Android 12 (API level 31)
Android only.
Self instance
Union[‘WebDriver’, ‘Location’]
Bases: CanExecuteCommands
Retrieves events information from the current session (Since Appium 1.16.0)
type – The event type to filter with
dict
Log a custom event on the Appium server. (Since Appium 1.16.0)
vendor – The vendor to log
event – The event to log
driver.log_event(‘appium’, ‘funEvent’)
Self instance
Union[‘WebDriver’, ‘LogEvent’]
Bases: CanExecuteCommands
Gets the log for a given log type.
log_type – Type of log that which will be returned
Example
driver.get_log('browser')
driver.get_log('driver')
driver.get_log('client')
driver.get_log('server')
Gets a list of the available log types. This only works with w3c compliant browsers.
Example
driver.log_types
Bases: CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence
Retrieves the file at path.
path – the path to the file on the device
The file’s contents encoded as Base64.
Retrieves a folder at path.
path – the path to the folder on the device
The folder’s contents zipped and encoded as Base64.
Puts the data from the file at source_path, encoded as Base64, in the file specified as path.
Specify either base64data or source_path, if both specified default to source_path
destination_path – the location on the device/simulator where the local file contents should be saved
base64data – file contents, encoded as Base64, to be written
device/simulator (to the file on the)
source_path – local file path for the file to be loaded on device
Self instance
Union[‘WebDriver’, ‘RemoteFS’]
Bases: CanExecuteCommands
Start asynchronous screen recording process.
Keyword Args |
iOS |
Android |
Win |
macOS |
|---|---|---|---|---|
remotePath |
O |
O |
O |
O |
user |
O |
O |
O |
O |
password |
O |
O |
O |
O |
method |
O |
O |
O |
O |
timeLimit |
O |
O |
O |
O |
forceRestart |
O |
O |
O |
O |
fileFieldName |
O |
O |
O |
O |
formFields |
O |
O |
O |
O |
headers |
O |
O |
O |
O |
videoQuality |
O |
|||
videoType |
O |
|||
videoFps |
O |
|||
videoFilter |
O |
O |
O |
|
videoScale |
O |
|||
pixelFormat |
O |
|||
videoSize |
O |
|||
bitRate |
O |
|||
bugReport |
O |
|||
fps |
O |
O |
||
captureCursor |
O |
O |
||
captureClicks |
O |
O |
||
deviceId |
O |
|||
preset |
O |
O |
||
audioInput |
O |
remotePath (str) – The remotePath upload option is the path to the remote location, where the resulting video from the previous screen recording should be uploaded. The following protocols are supported: http/https (multipart), ftp. Missing value (the default setting) means the content of the resulting file should be encoded as Base64 and passed as the endpoint response value, but an exception will be thrown if the generated media file is too big to fit into the available process memory. This option only has an effect if there is/was an active screen recording session and forced restart is not enabled (the default setting).
user (str) – The name of the user for the remote authentication. Only has an effect if both remotePath and password are set.
password (str) – The password for the remote authentication. Only has an effect if both remotePath and user are set.
method (str) – The HTTP method name (‘PUT’/’POST’). PUT method is used by default. Only has an effect if remotePath is set.
timeLimit (int) – The actual time limit of the recorded video in seconds. The default value for both iOS and Android is 180 seconds (3 minutes). The default value for macOS is 600 seconds (10 minutes). The maximum value for Android is 3 minutes. The maximum value for iOS is 10 minutes. The maximum value for macOS is 10000 seconds (166 minutes).
forcedRestart (bool) – Whether to ignore the result of previous capture and start a new recording immediately (True value). By default (False) the endpoint will try to catch and return the result of the previous capture if it’s still available.
fileFieldName (str) – [multipart/form-data requests] The name of the form field containing the binary payload. “file” by default. (Since Appium 1.18.0)
formFields (dict) – [multipart/form-data requests] Additional form fields mapping. If any entry has the same key as fileFieldName then it is going to be ignored. (Since Appium 1.18.0)
headers (dict) – [multipart/form-data requests] Headers mapping (Since Appium 1.18.0)
videoQuality (str) – [iOS] The video encoding quality: ‘low’, ‘medium’, ‘high’, ‘photo’. Defaults to ‘medium’.
videoType (str) – [iOS] The format of the screen capture to be recorded. Available formats: Execute ffmpeg -codecs in the terminal to see the list of supported video codecs. ‘mjpeg’ by default. (Since Appium 1.10.0)
videoFps (int) – [iOS] The Frames Per Second rate of the recorded video. Change this value if the resulting video is too slow or too fast. Defaults to 10. This can decrease the resulting file size.
videoFilters (str) – [iOS, Win, macOS] The FFMPEG video filters to apply. These filters allow to scale, flip, rotate and do many other useful transformations on the source video stream. The format of the property must comply with https://ffmpeg.org/ffmpeg-filters.html. (Since Appium 1.15)
videoScale (str) – [iOS] The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for possible values. No scale is applied by default. If videoFilters are set then the scale setting is effectively ignored. (Since Appium 1.10.0)
pixelFormat (str) – [iOS] Output pixel format. Run ffmpeg -pix_fmts to list possible values. For Quicktime compatibility, set to “yuv420p” along with videoType: “libx264”. (Since Appium 1.12.0)
videoSize (str) – [Android] The video size of the generated media file. The format is WIDTHxHEIGHT. The default value is the device’s native display resolution (if supported), 1280x720 if not. For best results, use a size supported by your device’s Advanced Video Coding (AVC) encoder.
bitRate (int) – [Android] The video bit rate for the video, in megabits per second. The default value is 4. You can increase the bit rate to improve video quality, but doing so results in larger movie files.
bugReport (str) – [Android] Makes the recorder to display an additional information on the video overlay, such as a timestamp, that is helpful in videos captured to illustrate bugs. This option is only supported since API level 27 (Android P).
fps (int) – [Win, macOS] The count of frames per second in the resulting video. Increasing fps value also increases the size of the resulting video file and the CPU usage.
captureCursor (bool) – [Win, macOS] Whether to capture the mouse cursor while recording the screen. Disabled by default.
captureClick (bool) – [Win, macOS] Whether to capture the click gestures while recording the screen. Disabled by default.
deviceId (int) – [macOS] Screen device index to use for the recording. The list of available devices could be retrieved using ffmpeg -f avfoundation -list_devices true -i command. This option is mandatory and must be always provided.
preset (str) – [Win, macOS] A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Read https://trac.ffmpeg.org/wiki/Encode/H.264 for more details. Possible values are ‘ultrafast’, ‘superfast’, ‘veryfast’(default), ‘faster’, ‘fast’, ‘medium’, ‘slow’, ‘slower’, ‘veryslow’
if stop_recording_screen isn’t called after previous start_recording_screen. Otherwise returns an empty string.
bytes
Gather the output from the previously started screen recording to a media file.
remotePath (str) – The remotePath upload option is the path to the remote location, where the resulting video should be uploaded. The following protocols are supported: http/https (multipart), ftp. Missing value (the default setting) means the content of the resulting file should be encoded as Base64 and passed as the endpoint response value, but an exception will be thrown if the generated media file is too big to fit into the available process memory.
user (str) – The name of the user for the remote authentication. Only has an effect if both remotePath and password are set.
password (str) – The password for the remote authentication. Only has an effect if both remotePath and user are set.
method (str) – The HTTP method name (‘PUT’/’POST’). PUT method is used by default. Only has an effect if remotePath is set.
fileFieldName (str) – [multipart/form-data requests] The name of the form field containing the binary payload. “file” by default. (Since Appium 1.18.0)
formFields (dict) – [multipart/form-data requests] Additional form fields mapping. If any entry has the same key as fileFieldName then it is going to be ignored. (Since Appium 1.18.0)
headers (dict) – [multipart/form-data requests] Headers mapping (Since Appium 1.18.0)
if the file has been successfully uploaded to a remote location (depends on the actual remotePath value).
bytes
Bases: CanExecuteCommands
Returns the appium server Settings for the current session.
Do not get Settings confused with Desired Capabilities, they are separate concepts. See https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md
Current settings
Set settings for the current session.
For more on settings, see: https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md
settings – dictionary of settings to apply to the current test session