appium_python_client_webdriver_extensions
appium_python_client_webdriver_extensions
extensions package
Subpackages
webdriver.extensions.android package
Submodules
webdriver.extensions.android.ac vi es module
Activities
Activities.current_activity
Activities.wait_activity()
webdriver.extensions.android.common module
Common
Common.current_package
Common.open_notifications()
webdriver.extensions.android.display module
Display
Display.get_display_density()
webdriver.extensions.android.gsm module
Gsm
Gsm.make_gsm_call()
Gsm.set_gsm_signal()
Gsm.set_gsm_voice()
GsmCallActions
GsmCallActions.ACCEPT
GsmCallActions.CALL
GsmCallActions.CANCEL
GsmCallActions.HOLD
GsmSignalStrength
GsmSignalStrength.GOOD
GsmSignalStrength.GREAT
GsmSignalStrength.MODERATE
GsmSignalStrength.NONE_OR_UNKNOWN
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
GsmSignalStrength.POOR
GsmVoiceState
GsmVoiceState.DENIED
GsmVoiceState.HOME
GsmVoiceState.OFF
GsmVoiceState.ON
GsmVoiceState.ROAMING
GsmVoiceState.SEARCHING
GsmVoiceState.UNREGISTERED
AndroidKey
AndroidKey.A
AndroidKey.ALT_LEFT
AndroidKey.ALT_RIGHT
AndroidKey.APOSTROPHE
AndroidKey.APP_SWITCH
AndroidKey.ASSIST
AndroidKey.AT
AndroidKey.AVR_INPUT
AndroidKey.AVR_POWER
AndroidKey.B
AndroidKey.BACK
AndroidKey.BACKSLASH
AndroidKey.BOOKMARK
AndroidKey.BREAK
AndroidKey.BRIGHTNESS_DOWN
AndroidKey.BRIGHTNESS_UP
AndroidKey.BUTTON_1
AndroidKey.BUTTON_10
AndroidKey.BUTTON_11
AndroidKey.BUTTON_12
AndroidKey.BUTTON_13
AndroidKey.BUTTON_14
AndroidKey.BUTTON_15
AndroidKey.BUTTON_16
AndroidKey.BUTTON_2
AndroidKey.BUTTON_3
AndroidKey.BUTTON_4
AndroidKey.BUTTON_5
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.BUTTON_6
AndroidKey.BUTTON_7
AndroidKey.BUTTON_8
AndroidKey.BUTTON_9
AndroidKey.BUTTON_A
AndroidKey.BUTTON_B
AndroidKey.BUTTON_C
AndroidKey.BUTTON_L1
AndroidKey.BUTTON_L2
AndroidKey.BUTTON_MODE
AndroidKey.BUTTON_R1
AndroidKey.BUTTON_R2
AndroidKey.BUTTON_SELECT
AndroidKey.BUTTON_START
AndroidKey.BUTTON_THUMBL
AndroidKey.BUTTON_THUMBR
AndroidKey.BUTTON_X
AndroidKey.BUTTON_Y
AndroidKey.BUTTON_Z
AndroidKey.C
AndroidKey.CALCULATOR
AndroidKey.CALENDAR
AndroidKey.CALL
AndroidKey.CAMERA
AndroidKey.CAPS_LOCK
AndroidKey.CAPTIONS
AndroidKey.CHANNEL_DOWN
AndroidKey.CHANNEL_UP
AndroidKey.CLEAR
AndroidKey.COMMA
AndroidKey.CONTACTS
AndroidKey.COPY
AndroidKey.CTRL_LEFT
AndroidKey.CTRL_RIGHT
AndroidKey.CUT
AndroidKey.D
AndroidKey.DEL
AndroidKey.DIGIT_0
AndroidKey.DIGIT_1
AndroidKey.DIGIT_2
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.DIGIT_3
AndroidKey.DIGIT_4
AndroidKey.DIGIT_5
AndroidKey.DIGIT_6
AndroidKey.DIGIT_7
AndroidKey.DIGIT_8
AndroidKey.DIGIT_9
AndroidKey.DPAD_CENTER
AndroidKey.DPAD_DOWN
AndroidKey.DPAD_DOWN_LEFT
AndroidKey.DPAD_DOWN_RIGHT
AndroidKey.DPAD_LEFT
AndroidKey.DPAD_RIGHT
AndroidKey.DPAD_UP
AndroidKey.DPAD_UP_LEFT
AndroidKey.DPAD_UP_RIGHT
AndroidKey.DVR
AndroidKey.E
AndroidKey.EISU
AndroidKey.ENDCALL
AndroidKey.ENTER
AndroidKey.ENVELOPE
AndroidKey.EQUALS
AndroidKey.ESCAPE
AndroidKey.EXPLORER
AndroidKey.F
AndroidKey.F1
AndroidKey.F10
AndroidKey.F11
AndroidKey.F12
AndroidKey.F2
AndroidKey.F3
AndroidKey.F4
AndroidKey.F5
AndroidKey.F6
AndroidKey.F7
AndroidKey.F8
AndroidKey.F9
AndroidKey.FOCUS
AndroidKey.FORWARD
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.FORWARD_DEL
AndroidKey.FUNCTION
AndroidKey.G
AndroidKey.GRAVE
AndroidKey.GUIDE
AndroidKey.H
AndroidKey.HEADSETHOOK
AndroidKey.HELP
AndroidKey.HENKAN
AndroidKey.HOME
AndroidKey.I
AndroidKey.INFO
AndroidKey.INSERT
AndroidKey.J
AndroidKey.K
AndroidKey.KANA
AndroidKey.KATAKANA_HIRAGANA
AndroidKey.KEYCODE_ZOOM_IN
AndroidKey.KEYCODE_ZOOM_OUT
AndroidKey.KEY_11
AndroidKey.KEY_12
AndroidKey.L
AndroidKey.LANGUAGE_SWITCH
AndroidKey.LAST_CHANNEL
AndroidKey.LEFT_BRACKET
AndroidKey.M
AndroidKey.MANNER_MODE
AndroidKey.MEDIA_AUDIO_TRACK
AndroidKey.MEDIA_CLOSE
AndroidKey.MEDIA_EJECT
AndroidKey.MEDIA_FAST_FORWARD
AndroidKey.MEDIA_NEXT
AndroidKey.MEDIA_PAUSE
AndroidKey.MEDIA_PLAY
AndroidKey.MEDIA_PLAY_PAUSE
AndroidKey.MEDIA_PREVIOUS
AndroidKey.MEDIA_RECORD
AndroidKey.MEDIA_REWIND
AndroidKey.MEDIA_SKIP_BACKWARD
AndroidKey.MEDIA_SKIP_FORWARD
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.MEDIA_STEP_BACKWARD
AndroidKey.MEDIA_STEP_FORWARD
AndroidKey.MEDIA_STOP
AndroidKey.MEDIA_TOP_MENU
AndroidKey.MENU
AndroidKey.META_LEFT
AndroidKey.META_RIGHT
AndroidKey.MINUS
AndroidKey.MODE_3D
AndroidKey.MOVE_END
AndroidKey.MOVE_HOME
AndroidKey.MUHENKAN
AndroidKey.MUSIC
AndroidKey.MUTE
AndroidKey.N
AndroidKey.NAVIGATE_IN
AndroidKey.NAVIGATE_NEXT
AndroidKey.NAVIGATE_OUT
AndroidKey.NAVIGATE_PREVIOUS
AndroidKey.NOTIFICATION
AndroidKey.NUM
AndroidKey.NUMPAD_0
AndroidKey.NUMPAD_1
AndroidKey.NUMPAD_2
AndroidKey.NUMPAD_3
AndroidKey.NUMPAD_4
AndroidKey.NUMPAD_5
AndroidKey.NUMPAD_6
AndroidKey.NUMPAD_7
AndroidKey.NUMPAD_8
AndroidKey.NUMPAD_9
AndroidKey.NUMPAD_ADD
AndroidKey.NUMPAD_COMMA
AndroidKey.NUMPAD_DIVIDE
AndroidKey.NUMPAD_DOT
AndroidKey.NUMPAD_ENTER
AndroidKey.NUMPAD_EQUALS
AndroidKey.NUMPAD_LEFT_PAREN
AndroidKey.NUMPAD_MULTIPLY
AndroidKey.NUMPAD_RIGHT_PAREN
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.NUMPAD_SUBTRACT
AndroidKey.NUM_LOCK
AndroidKey.O
AndroidKey.P
AndroidKey.PAGE_DOWN
AndroidKey.PAGE_UP
AndroidKey.PAIRING
AndroidKey.PERIOD
AndroidKey.PICTSYMBOLS
AndroidKey.PLUS
AndroidKey.POUND
AndroidKey.POWER
AndroidKey.PROG_BLUE
AndroidKey.PROG_GREEN
AndroidKey.PROG_RED
AndroidKey.PROG_YELLOW
AndroidKey.Q
AndroidKey.R
AndroidKey.RIGHT_BRACKET
AndroidKey.RO
AndroidKey.S
AndroidKey.SCROLL_LOCK
AndroidKey.SEARCH
AndroidKey.SEMICOLON
AndroidKey.SETTINGS
AndroidKey.SHIFT_LEFT
AndroidKey.SHIFT_RIGHT
AndroidKey.SLASH
AndroidKey.SLEEP
AndroidKey.SOFT_LEFT
AndroidKey.SOFT_RIGHT
AndroidKey.SOFT_SLEEP
AndroidKey.SPACE
AndroidKey.STAR
AndroidKey.STB_INPUT
AndroidKey.STB_POWER
AndroidKey.STEM_1
AndroidKey.STEM_2
AndroidKey.STEM_3
AndroidKey.STEM_PRIMARY
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.SWITCH_CHARSET
AndroidKey.SYM
AndroidKey.SYSRQ
AndroidKey.T
AndroidKey.TAB
AndroidKey.TV
AndroidKey.TV_ANTENNA_CABLE
AndroidKey.TV_AUDIO_DESCRIPTION
AndroidKey.TV_AUDIO_DESCRIPTION_MIX_DOWN
AndroidKey.TV_AUDIO_DESCRIPTION_MIX_UP
AndroidKey.TV_CONTENTS_MENU
AndroidKey.TV_DATA_SERVICE
AndroidKey.TV_INPUT
AndroidKey.TV_INPUT_COMPONENT_1
AndroidKey.TV_INPUT_COMPONENT_2
AndroidKey.TV_INPUT_COMPOSITE_1
AndroidKey.TV_INPUT_COMPOSITE_2
AndroidKey.TV_INPUT_HDMI_1
AndroidKey.TV_INPUT_HDMI_2
AndroidKey.TV_INPUT_HDMI_3
AndroidKey.TV_INPUT_HDMI_4
AndroidKey.TV_INPUT_VGA_1
AndroidKey.TV_MEDIA_CONTEXT_MENU
AndroidKey.TV_NETWORK
AndroidKey.TV_NUMBER_ENTRY
AndroidKey.TV_POWER
AndroidKey.TV_RADIO_SERVICE
AndroidKey.TV_SATELLITE
AndroidKey.TV_SATELLITE_BS
AndroidKey.TV_SATELLITE_CS
AndroidKey.TV_SATELLITE_SERVICE
AndroidKey.TV_TELETEXT
AndroidKey.TV_TERRESTRIAL_ANALOG
AndroidKey.TV_TERRESTRIAL_DIGITAL
AndroidKey.TV_TIMER_PROGRAMMING
AndroidKey.TV_ZOOM_MODE
AndroidKey.U
AndroidKey.UNKNOWN
AndroidKey.V
AndroidKey.VOICE_ASSIST
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
AndroidKey.VOLUME_DOWN
AndroidKey.VOLUME_MUTE
AndroidKey.VOLUME_UP
AndroidKey.W
AndroidKey.WAKEUP
AndroidKey.WINDOW
AndroidKey.X
AndroidKey.Y
AndroidKey.YEN
AndroidKey.Z
AndroidKey.ZENKAKU_HANKAKU
AndroidKey.confirm_buttons
AndroidKey.gamepad_buttons
AndroidKey.is_confirm_key()
AndroidKey.is_gamepad_button()
AndroidKey.is_media_key()
AndroidKey.is_system_key()
AndroidKey.is_wake_key()
AndroidKey.media_buttons
AndroidKey.system_buttons
AndroidKey.wake_buttons
webdriver.extensions.android.network module
NetSpeed
NetSpeed.EDGE
NetSpeed.EVDO
NetSpeed.FULL
NetSpeed.GPRS
NetSpeed.GSM
NetSpeed.HSDPA
NetSpeed.LTE
NetSpeed.SCSD
NetSpeed.UMTS
Network
Network.network_connection
Network.set_network_connection()
Network.set_network_speed()
Network.toggle_wifi()
NetworkMask
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
NetworkMask.AIRPLANE_MODE
NetworkMask.DATA
NetworkMask.WIFI
webdriver.extensions.android.performance module
Performance
Performance.get_performance_data()
Performance.get_performance_data_types()
webdriver.extensions.android.power module
Power
Power.AC_OFF
Power.AC_ON
Power.set_power_ac()
Power.set_power_capacity()
webdriver.extensions.android.sms module
Sms
Sms.send_sms()
webdriver.extensions.android.system_bars module
SystemBars
SystemBars.get_system_bars()
Module contents
webdriver.extensions.flu er_integra on package
Submodules
webdriver.extensions.flu er_integra on.flu er_commands module
FlutterCommand
FlutterCommand.activate_injected_image()
FlutterCommand.execute_flutter_command()
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()
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
webdriver.extensions.flu er_integra on.flu er_finder module
FlutterFinder
FlutterFinder.as_args()
FlutterFinder.by_key()
FlutterFinder.by_semantics_label()
FlutterFinder.by_text()
FlutterFinder.by_text_containing()
FlutterFinder.by_type()
FlutterFinder.to_dict()
ScrollDirection
ScrollDirection.DOWN
ScrollDirection.UP
Module contents
Submodules
webdriver.extensions.action_helpers module
class ActionHelpers
Bases: object
drag_and_drop(origin_el: WebElement, des na on_el: WebElement, pause: float | None = None)→ Self
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Usage:
scroll(origin_el: WebElement, des na on_el: WebElement, dura on: int | None = None)→ Self
Parameters: origin_el – the element from which to begin scrolling (center of element)
des na on_el – the element to scroll to (center of element)
dura on – defines speed of scroll ac on when moving from originalEl to
des na onEl. Default is 600 ms for W3C spec.
Usage:
driver.scroll(el1, el2)
swipe(start_x: int, start_y: int, end_x: int, end_y: int, dura on: int = 0)→ Self
Swipe from one point to another point, for an op onal dura on.
Usage:
tap(posi ons: List[Tuple[int, int]], dura on: int | None = None)→ Self
Taps on an par cular place with up to five fingers, holding for a certain me
Parameters: posi ons – an array of tuples represen ng the x/y coordinates of the fingers
to tap. Length can be up to five.
dura on – length of me to tap, in ms
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Usage:
webdriver.extensions.applications module
app_strings(language: str | None = None, string_file: str | None = None)→ Dict[str, str]
Returns the applica on strings from the device for the specified language.
Puts the applica on in the background on the device for a certain dura on.
Parameters: seconds – the dura on for the applica on to remain in the background.
app (Providing a nega ve value will con nue immediately a er pu ng the)
background. (under test to the)
Returns: Self instance
Return type: Union[‘WebDriver’, ‘Applica ons’]
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
allowTestPackages (bool) – [Android only] whether to allow installa o
of packages marked as test in the manifest. False by default
useSdcard (bool) – [Android only] whether to use the SD card to insta
the app. False by default
grantPermissions (bool) – [Android only] whether to automa cally gra
applica on permissions on Android 6+ a er the installa on complete
False by default
Returns: Self instance
Return type: Union[‘WebDriver’, ‘Applica ons’]
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
class Clipboard(*args, **kwargs)
get_clipboard_text()→ str
Returns: The actual clipboard text or an empty string if the clipboard is empty
set_clipboard(content: bytes, content_type: str = 'plaintext', label: str | None = None)→ Self
webdriver.extensions.context module
Bases: CanExecuteCommands
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
property context: str
Usage:
driver.context
Usage:
driver.contexts
Usage:
driver.current_context
webdriver.extensions.device_time module
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
property device_time: str
ISO-8601
Usage:
self.driver.get_device_ me()
self.driver.get_device_ me(“YYYY-MM-DD”)
Bases: CanExecuteCommands
execute_driver(script: str, script_type: str = 'webdriverio', meout_ms: int | None = None)→ Any
Run a set of script against the current session, allowing execu on of many commands in one
Appium request. Please read h p://appium.io/docs/en/commands/session/execute-driver for more
details about the acceptable scripts and the output format.
Usage:
self.driver.execute_driver(script=’return [];’)
self.driver.execute_driver(script=’return [];’, script_type=’webdriverio’)
self.driver.execute_driver(script=’return [];’, script_type=’webdriverio’, meout_ms=10000)
Returns: The result of the script. It has ‘result’ and ‘logs’ keys.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Return type: ExecuteDriver.Result
Raises: WebDriverExcep on – If something error happenes in the script. The message
has the original error message.
webdriver.extensions.execute_mobile_command module
Bases: CanExecuteScripts
Returns:
containing the following entries
level: Ba ery level in range [0.0, 1.0], where 1.0 means 100% charge.
On iOS (XCUITest):
On Android (UIAutomator2):
webdriver.extensions.hw_actions module
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Bases: CanExecuteCommands , CanExecuteScripts , CanRememberExtensionPresence
Authen cate users by using their finger print scans on supported Android emulators.
Parameters: finger_id – Finger prints stored in Android Keystore system (from 1 to 10)
is_locked()→ bool
Lock the device. No changes are made if the device is already unlocked.
Parameters: seconds – The dura on to lock the device, in seconds. The device is going to be
locked forever un l unlock is called if it equals or is less than zero, otherwise this
call blocks un l the meout expires and unlocks the screen automa cally.
Returns: Self instance
Return type: Union[‘WebDriver’, ‘HardwareAc ons’]
shake()→ Self
toggle_touch_id_enrollment()→ Self
unlock()→ Self
Unlock the device. No changes are made if the device is already locked.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Return type: Union[‘WebDriver’, ‘HardwareAc ons’]
webdriver.extensions.images_comparison module
Bases: CanExecuteCommands
Performs images matching by template to find possible occurrence of the par al image in the full
image.
Read
h ps://docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matc
hing.html for more details on this topic. The method supports all image formats, which are
supported by OpenCV itself.
rect (dict): The region of the par al image occurrence on the full image.
The rect is represented by a dic onary with ‘x’, ‘y’, ‘width’ and ‘height’
keys
The flow there is similar to the one used in find_image_occurrence, but it is mandatory that both
images are of equal resolu on. The method supports all image formats, which are supported by
OpenCV itself.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
visualiza on (bytes): base64-encoded content of PNG visualiza on of th
current comparison
score (float): The similarity score as a float number in range [0.0, 1.0].
1.0 is the highest score (means both images are totally equal).
Read h ps://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.
The more matching edges there are no both images the more similar
they are.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
points1 (dict): The array of matching points on the first image. Each poin
a dic onary
rect1 (dict): The bounding rect for the points1 array or a zero rect if not
enough matching points
were found. The rect is represented by a dic onary with ‘x’, ‘y’, ‘width’
and ‘height’ keys
points2 (dict): The array of matching points on the second image. Each
point is a dic onary
rect2 (dict): The bounding rect for the points2 array or a zero rect if not
enough matching points
were found. The rect is represented by a dic onary with ‘x’, ‘y’, ‘width’
and ‘height’ keys
hide_keyboard(key_name: str | None = None, key: str | None = None, strategy: str | None = None)→ Self
In iOS, use key_name to press a par cular key, or strategy. In Android, no parameters are used.
is_keyboard_shown()→ bool
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Android only. Possible keycodes can be found in
h p://developer.android.com/reference/android/view/KeyEvent.html.
long_press_keycode(keycode: int, metastate: int | None = None, flags: int | None = None)→ Self
press_keycode(keycode: int, metastate: int | None = None, flags: int | None = None)→ Self
webdriver.extensions.location module
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
property location: Dict[str, float]
Returns:
A dic onary whose keys are
la tude (float)
longitude (float)
al tude (float)
set_location(la tude: float | str, longitude: float | str, al tude: float | str | None = None, speed: float | str | None
= None, satellites: float | str | None = None)→ Self
toggle_location_services()→ Self
Toggle the loca on services on the device. This API only reliably since Android 12 (API level 31)
Android only.
Bases: CanExecuteCommands
Retrieves events informa on from the current session (Since Appium 1.16.0)
Usage:
events = driver.get_events()
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
events = driver.get_events([‘appium:funEvent’])
Returns:
A dic onary of events ming informa on containing the following entries
commands: (list of dict) List of dic onaries containing the following entries
cmd: The command name that has been sent to the appium server
startTime: Received me
endTime: Response me
Usage:
driver.log_event(‘appium’, ‘funEvent’)
webdriver.extensions.remote_fs module
push_file(des na on_path: str, base64data: str | None = None, source_path: str | None = None)→ Self
Puts the data from the file at source_path, encoded as Base64, in the file specified as path.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Parameters: des na on_path – the loca on on the device/simulator where the local file
contents should be saved
base64data – file contents, encoded as Base64, to be wri en
device/simulator (to the file on the)
source_path – local file path for the file to be loaded on device
Returns: Self instance
Return type: Union[‘WebDriver’, ‘RemoteFS’]
webdriver.extensions.screen_record module
Bases: CanExecuteCommands
remotePath O O O O
user O O O O
password O O O O
method O O O O
meLimit 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
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Keyword Args iOS Android Win macOS
captureCursor O O
captureClicks O O
deviceId O
preset O O
audioInput O
Keyword Arguments: remotePath (str) – The remotePath upload op on is the path to the
remote loca on, where the resul ng video from the previous screen
recording should be uploaded. The following protocols are supported
h p/h ps (mul part), p. Missing value (the default se ng) means th
content of the resul ng file should be encoded as Base64 and passed
the endpoint response value, but an excep on will be thrown if the
generated media file is too big to fit into the available process memor
This op on only has an effect if there is/was an ac ve screen recordin
session and forced restart is not enabled (the default se ng).
user (str) – The name of the user for the remote authen ca on. Only
an effect if both remotePath and password are set.
password (str) – The password for the remote authen ca on. Only ha
an effect if both remotePath and user are set.
method (str) – The HTTP method name (‘PUT’/’POST’). PUT method i
used by default. Only has an effect if remotePath is set.
meLimit (int) – The actual me limit of the recorded video in second
The default value for both iOS and Android is 180 seconds (3 minutes
The default value for macOS is 600 seconds (10 minutes). The maxim
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 captu
and start a new recording immediately (True value). By default (False) t
endpoint will try to catch and return the result of the previous captur
it’s s ll available.
fileFieldName (str) – [mul part/form-data requests] The name of the
form field containing the binary payload. “file” by default. (Since Appiu
1.18.0)
formFields (dict) – [mul part/form-data requests] Addi onal form fiel
mapping. If any entry has the same key as fileFieldName then it is goin
to be ignored. (Since Appium 1.18.0)
headers (dict) – [mul part/form-data requests] Headers mapping (Sin
Appium 1.18.0)
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
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 recorde
Available formats: Execute ffmpeg -codecs in the terminal to see the li
of supported video codecs. ‘mjpeg’ by default. (Since Appium 1.10.0)
videoFps (int) – [iOS] The Frames Per Second rate of the recorded vid
Change this value if the resul ng video is too slow or too fast. Defaul
to 10. This can decrease the resul ng file size.
videoFilters (str) – [iOS, Win, macOS] The FFMPEG video filters to
apply. These filters allow to scale, flip, rotate and do many other usefu
transforma ons on the source video stream. The format of the prope
must comply with h ps://ffmpeg.org/ffmpeg-filters.html. (Since Appiu
1.15)
videoScale (str) – [iOS] The scaling value to apply. Read
h ps://trac.ffmpeg.org/wiki/Scaling for possible values. No scale is
applied by default. If videoFilters are set then the scale se ng is
effec vely ignored. (Since Appium 1.10.0)
pixelFormat (str) – [iOS] Output pixel format. Run ffmpeg -pix_fmts to
possible values. For Quick me compa bility, 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 na v
display resolu on (if supported), 1280x720 if not. For best results, us
size supported by your device’s Advanced Video Coding (AVC) encode
bitRate (int) – [Android] The video bit rate for the video, in megabits p
second. The default value is 4. You can increase the bit rate to improv
video quality, but doing so results in larger movie files.
bugReport (str) – [Android] Makes the recorder to display an addi on
informa on on the video overlay, such as a mestamp, that is helpful
videos captured to illustrate bugs. This op on is only supported since
API level 27 (Android P).
fps (int) – [Win, macOS] The count of frames per second in the resul
video. Increasing fps value also increases the size of the resul ng vide
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
avfounda on -list_devices true -i command. This op on is mandatory a
must be always provided.
preset (str) – [Win, macOS] A preset is a collec on of op ons that wil
provide a certain encoding speed to compression ra o. A slower pres
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
will provide be er compression (compression is quality per filesize). T
means that, for example, if you target a certain file size or constant bi
rate, you will achieve be er quality with a slower preset. Read
h ps://trac.ffmpeg.org/wiki/Encode/H.264 for more details. Possible
values are ‘ultrafast’, ‘superfast’, ‘veryfast’(default), ‘faster’, ‘fast’,
‘medium’, ‘slow’, ‘slower’, ‘veryslow’
Returns:
Base-64 encoded content of the recorded media
Gather the output from the previously started screen recording to a media file.
Keyword Arguments: remotePath (str) – The remotePath upload op on is the path to the
remote loca on, where the resul ng video should be uploaded. The
following protocols are supported: h p/h ps (mul part), p. Missing
value (the default se ng) means the content of the resul ng file shou
be encoded as Base64 and passed as the endpoint response value, bu
an excep on 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 authen ca on. Only
an effect if both remotePath and password are set.
password (str) – The password for the remote authen ca on. Only ha
an effect if both remotePath and user are set.
method (str) – The HTTP method name (‘PUT’/’POST’). PUT method i
used by default. Only has an effect if remotePath is set.
fileFieldName (str) – [mul part/form-data requests] The name of the
form field containing the binary payload. “file” by default. (Since Appiu
1.18.0)
formFields (dict) – [mul part/form-data requests] Addi onal form fiel
mapping. If any entry has the same key as fileFieldName then it is goin
to be ignored. (Since Appium 1.18.0)
headers (dict) – [mul part/form-data requests] Headers mapping (Sin
Appium 1.18.0)
Returns:
Base-64 encoded content of the recorded media file or an empty string
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
webdriver.extensions.session module
Bases: CanExecuteCommands
Usage:
events = driver.events
webdriver.extensions.settings module
Bases: CanExecuteCommands
Do not get Se ngs confused with Desired Capabili es, they are separate concepts. See
h ps://github.com/appium/appium/blob/master/docs/en/advanced-concepts/se ngs.md
Parameters: se ngs – dic onary of se ngs to apply to the current test session
Module contents
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF