appium_python_client_webdriver_extensions_android
appium_python_client_webdriver_extensions_android
android package
Submodules
webdriver.extensions.android.activities module
webdriver.extensions.android.common module
open_notifications()→ Self
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Return type: Union[‘WebDriver’, ‘Common’]
webdriver.extensions.android.display module
get_display_density()→ int
Usage:
self.driver.get_display_density()
webdriver.extensions.android.gsm module
Android only.
Usage:
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Android only.
Usage:
self.driver.set_gsm_signal(GsmSignalStrength.GOOD)
Android only.
Usage:
self.driver.set_gsm_voice(GsmVoiceState.HOME)
class GsmCallActions
Bases: object
ACCEPT= 'accept'
CALL= 'call'
CANCEL= 'cancel'
HOLD= 'hold'
class GsmSignalStrength
Bases: object
GOOD= 3
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
GREAT= 4
MODERATE= 2
NONE_OR_UNKNOWN= 0
POOR= 1
class GsmVoiceState
Bases: object
DENIED= 'denied'
HOME= 'home'
OFF= 'off'
ON= 'on'
ROAMING= 'roaming'
SEARCHING= 'searching'
UNREGISTERED= 'unregistered'
webdriver.extensions.android.nativekey module
class AndroidKey
Bases: object
A= 29
ALT_LEFT= 57
ALT_RIGHT= 58
APOSTROPHE= 75
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
APP_SWITCH= 187
ASSIST= 219
AT= 77
AVR_INPUT= 182
AVR_POWER= 181
B= 30
BACK= 4
BACKSLASH= 73
BOOKMARK= 174
BREAK= 121
BRIGHTNESS_DOWN= 220
BRIGHTNESS_UP= 221
BUTTON_1= 188
BUTTON_10= 197
BUTTON_11= 198
BUTTON_12= 199
BUTTON_13= 200
BUTTON_14= 201
BUTTON_15= 202
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
BUTTON_16= 203
BUTTON_2= 189
BUTTON_3= 190
BUTTON_4= 191
BUTTON_5= 192
BUTTON_6= 193
BUTTON_7= 194
BUTTON_8= 195
BUTTON_9= 196
BUTTON_A= 96
BUTTON_B= 97
BUTTON_C= 98
BUTTON_L1= 102
BUTTON_L2= 104
BUTTON_MODE= 110
BUTTON_R1= 103
BUTTON_R2= 105
BUTTON_SELECT= 109
BUTTON_START= 108
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
BUTTON_THUMBL= 106
BUTTON_THUMBR= 107
BUTTON_X= 99
BUTTON_Y= 100
BUTTON_Z= 101
C= 31
CALCULATOR= 210
CALENDAR= 208
CALL= 5
CAMERA= 27
CAPS_LOCK= 115
CAPTIONS= 175
CHANNEL_DOWN= 167
CHANNEL_UP= 166
CLEAR= 28
COMMA= 55
CONTACTS= 207
COPY= 278
CTRL_LEFT= 113
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
CTRL_RIGHT= 114
CUT= 277
D= 32
DEL= 67
DIGIT_0= 7
DIGIT_1= 8
DIGIT_2= 9
DIGIT_3= 10
DIGIT_4= 11
DIGIT_5= 12
DIGIT_6= 13
DIGIT_7= 14
DIGIT_8= 15
DIGIT_9= 16
DPAD_CENTER= 23
DPAD_DOWN= 20
DPAD_DOWN_LEFT= 269
DPAD_DOWN_RIGHT= 271
DPAD_LEFT= 21
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
DPAD_RIGHT= 22
DPAD_UP= 19
DPAD_UP_LEFT= 268
DPAD_UP_RIGHT= 270
DVR= 173
E= 33
EISU= 212
ENDCALL= 6
ENTER= 66
ENVELOPE= 65
EQUALS= 70
ESCAPE= 111
EXPLORER= 64
F= 34
F1= 131
F10= 140
F11= 141
F12= 142
F2= 132
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
F3= 133
F4= 134
F5= 135
F6= 136
F7= 137
F8= 138
F9= 139
FOCUS= 80
FORWARD= 125
FORWARD_DEL= 112
FUNCTION= 119
G= 35
GRAVE= 68
GUIDE= 172
H= 36
HEADSETHOOK= 79
HELP= 259
HENKAN= 214
HOME= 3
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
I= 37
INFO= 165
INSERT= 124
J= 38
K= 39
KANA= 218
KATAKANA_HIRAGANA= 215
KEYCODE_ZOOM_IN= 168
KEYCODE_ZOOM_OUT= 169
KEY_11= 227
KEY_12= 228
L= 40
LANGUAGE_SWITCH= 204
LAST_CHANNEL= 229
LEFT_BRACKET= 71
M= 41
MANNER_MODE= 205
MEDIA_AUDIO_TRACK= 222
MEDIA_CLOSE= 128
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
MEDIA_EJECT= 129
MEDIA_FAST_FORWARD= 90
MEDIA_NEXT= 87
MEDIA_PAUSE= 127
MEDIA_PLAY= 126
MEDIA_PLAY_PAUSE= 85
MEDIA_PREVIOUS= 88
MEDIA_RECORD= 130
MEDIA_REWIND= 89
MEDIA_SKIP_BACKWARD= 273
MEDIA_SKIP_FORWARD= 272
MEDIA_STEP_BACKWARD= 275
MEDIA_STEP_FORWARD= 274
MEDIA_STOP= 86
MEDIA_TOP_MENU= 226
MENU= 82
META_LEFT= 117
META_RIGHT= 118
MINUS= 69
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
MODE_3D= 206
MOVE_END= 123
MOVE_HOME= 122
MUHENKAN= 213
MUSIC= 209
MUTE= 91
N= 42
NAVIGATE_IN= 262
NAVIGATE_NEXT= 261
NAVIGATE_OUT= 263
NAVIGATE_PREVIOUS= 260
NOTIFICATION= 83
NUM= 78
NUMPAD_0= 144
NUMPAD_1= 145
NUMPAD_2= 146
NUMPAD_3= 147
NUMPAD_4= 148
NUMPAD_5= 149
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
NUMPAD_6= 150
NUMPAD_7= 151
NUMPAD_8= 152
NUMPAD_9= 153
NUMPAD_ADD= 157
NUMPAD_COMMA= 159
NUMPAD_DIVIDE= 154
NUMPAD_DOT= 158
NUMPAD_ENTER= 160
NUMPAD_EQUALS= 161
NUMPAD_LEFT_PAREN= 162
NUMPAD_MULTIPLY= 155
NUMPAD_RIGHT_PAREN= 163
NUMPAD_SUBTRACT= 156
NUM_LOCK= 143
O= 43
P= 44
PAGE_DOWN= 93
PAGE_UP= 92
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
PAIRING= 225
PERIOD= 56
PICTSYMBOLS= 94
PLUS= 81
POUND= 18
POWER= 26
PROG_BLUE= 186
PROG_GREEN= 184
PROG_RED= 183
PROG_YELLOW= 185
Q= 45
R= 46
RIGHT_BRACKET= 72
RO= 217
S= 47
SCROLL_LOCK= 116
SEARCH= 84
SEMICOLON= 74
SETTINGS= 176
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
SHIFT_LEFT= 59
SHIFT_RIGHT= 60
SLASH= 76
SLEEP= 223
SOFT_LEFT= 1
SOFT_RIGHT= 2
SOFT_SLEEP= 276
SPACE= 62
STAR= 17
STB_INPUT= 180
STB_POWER= 179
STEM_1= 265
STEM_2= 266
STEM_3= 267
STEM_PRIMARY= 264
SWITCH_CHARSET= 95
SYM= 63
SYSRQ= 120
T= 48
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
TAB= 61
TV= 170
TV_ANTENNA_CABLE= 242
TV_AUDIO_DESCRIPTION= 252
TV_AUDIO_DESCRIPTION_MIX_DOWN= 254
TV_AUDIO_DESCRIPTION_MIX_UP= 253
TV_CONTENTS_MENU= 256
TV_DATA_SERVICE= 230
TV_INPUT= 178
TV_INPUT_COMPONENT_1= 249
TV_INPUT_COMPONENT_2= 250
TV_INPUT_COMPOSITE_1= 247
TV_INPUT_COMPOSITE_2= 248
TV_INPUT_HDMI_1= 243
TV_INPUT_HDMI_2= 244
TV_INPUT_HDMI_3= 245
TV_INPUT_HDMI_4= 246
TV_INPUT_VGA_1= 251
TV_MEDIA_CONTEXT_MENU= 257
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
TV_NETWORK= 241
TV_NUMBER_ENTRY= 234
TV_POWER= 177
TV_RADIO_SERVICE= 232
TV_SATELLITE= 237
TV_SATELLITE_BS= 238
TV_SATELLITE_CS= 239
TV_SATELLITE_SERVICE= 240
TV_TELETEXT= 233
TV_TERRESTRIAL_ANALOG= 235
TV_TERRESTRIAL_DIGITAL= 236
TV_TIMER_PROGRAMMING= 258
TV_ZOOM_MODE= 255
U= 49
UNKNOWN= 0
V= 50
VOICE_ASSIST= 231
VOLUME_DOWN= 25
VOLUME_MUTE= 164
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
VOLUME_UP= 24
W= 51
WAKEUP= 224
WINDOW= 171
X= 52
Y= 53
YEN= 216
Z= 54
ZENKAKU_HANKAKU= 211
gamepad_buttons
= [96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 188, 189, 190, 191, 192, 193,
194, 195, 196, 197, 198, 199, 200, 201, 202, 203]
Returns true if the key will, by default, trigger a click on the focused view.
Returns true if this key is a media key, which can be send to apps that are interested in media
key events.
Returns true if the key is a system key, System keys can not be used for menu shortcuts.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
sta c is_wake_key(code: int)→ bool
media_buttons= [126, 127, 85, 91, 79, 86, 87, 88, 89, 130, 90]
system_buttons
= [82, 2, 3, 4, 5, 6, 24, 25, 164, 91, 26, 79, 126, 127, 85, 86, 87, 88, 89, 130, 90, 27, 80, 84, 220, 221, 222]
webdriver.extensions.android.network module
class NetSpeed
Bases: object
EDGE= 'edge'
EVDO= 'evdo'
FULL= 'full'
GPRS= 'gprs'
GSM= 'gsm'
HSDPA= 'hsdpa'
LTE= 'lte'
SCSD= 'scsd'
UMTS= 'umts'
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
property network_connection: int
This API only works reliably on emulators (any version) and real devices since API level 31.
Possible values:
0 (None) 0 0 0
1 (Airplane Mode) 0 0 1
2 (Wifi only) 0 1 0
4 (Data only) 1 0 0
This API only works reliably on emulators (any version) and real devices since API level 31.
Usage:
self.driver.set_network_speed(NetSpeed.LTE)
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
toggle_wifi()→ Self
Toggle the wifi on the device, Android only. This API only works reliably on emulators (any
version) and real devices since API level 31.
class NetworkMask
Bases: object
AIRPLANE_MODE= 1
DATA= 4
WIFI= 2
webdriver.extensions.android.performance module
Returns the informa on of the system state which is supported to read as like cpu, memory,
network traffic, and ba ery.
Android only.
Usage:
self.driver.get_performance_data(‘my.app.package’, ‘cpuinfo’, 5)
get_performance_data_types()→ List[str]
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Returns the informa on types of the system state which is supported to read as like cpu,
memory, network traffic, and ba ery. Android only.
Usage:
self.driver.get_performance_data_types()
webdriver.extensions.android.power module
AC_OFF= 'off'
AC_ON= 'on'
Android only.
Usage:
self.driver.set_power_ac(Power.AC_OFF)
self.driver.set_power_ac(Power.AC_ON)
Android only.
Parameters: percent – The power capacity to be set. Can be set from 0 to 100
Usage:
self.driver.set_power_capacity(50)
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Return type: Union[‘WebDriver’, ‘Power’]
webdriver.extensions.android.sms module
Android only.
Usage:
webdriver.extensions.android.system_bars module
Retrieve visibility and bounds informa on of the status and naviga on bars.
Android only.
Returns:
A dic onary whose keys are
statusBar
visible
x
y
width
height
naviga onBar
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
visible
x
y
width
height
Module contents
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF