Appium-Python-Client 6.0.11__py3-none-any.whl → 6.0.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- appium/webdriver/appium_connection.py +6 -3
- appium/webdriver/extensions/execute_driver.py +14 -9
- appium/webdriver/extensions/screen_record.py +6 -4
- {appium_python_client-6.0.11.dist-info → appium_python_client-6.0.12.dist-info}/METADATA +1 -1
- {appium_python_client-6.0.11.dist-info → appium_python_client-6.0.12.dist-info}/RECORD +7 -7
- {appium_python_client-6.0.11.dist-info → appium_python_client-6.0.12.dist-info}/WHEEL +0 -0
- {appium_python_client-6.0.11.dist-info → appium_python_client-6.0.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -56,10 +56,13 @@ class AppiumConnection(RemoteConnection):
|
|
|
56
56
|
This method will be used in sending a request method in this class.
|
|
57
57
|
"""
|
|
58
58
|
|
|
59
|
+
extra_headers = cls.extra_headers.copy()
|
|
59
60
|
if parsed_url.path.endswith('/session'):
|
|
60
61
|
# https://github.com/appium/appium-base-driver/pull/400
|
|
61
|
-
|
|
62
|
+
# Keep the per-request idempotency key local: sessions may be created concurrently.
|
|
63
|
+
extra_headers[HEADER_IDEMOTENCY_KEY] = str(uuid.uuid4())
|
|
62
64
|
else:
|
|
63
|
-
|
|
65
|
+
extra_headers = _get_new_headers(HEADER_IDEMOTENCY_KEY, extra_headers)
|
|
66
|
+
cls.extra_headers = extra_headers
|
|
64
67
|
|
|
65
|
-
return {**super().get_remote_connection_headers(parsed_url, keep_alive=keep_alive), **
|
|
68
|
+
return {**super().get_remote_connection_headers(parsed_url, keep_alive=keep_alive), **extra_headers}
|
|
@@ -20,8 +20,19 @@ from ..mobilecommand import MobileCommand as Command
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class ExecuteDriver(CanExecuteCommands):
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
class Result:
|
|
24
|
+
"""The result of ``execute_driver``, containing ``result`` and ``logs``."""
|
|
25
|
+
|
|
26
|
+
result: Any
|
|
27
|
+
logs: dict[str, list[Any]]
|
|
28
|
+
|
|
29
|
+
def __init__(self, res: dict[str, Any]) -> None:
|
|
30
|
+
self.result = res['result']
|
|
31
|
+
self.logs = res['logs']
|
|
32
|
+
|
|
33
|
+
def execute_driver(
|
|
34
|
+
self, script: str, script_type: str = 'webdriverio', timeout_ms: int | None = None
|
|
35
|
+
) -> 'ExecuteDriver.Result':
|
|
25
36
|
"""Run a set of script against the current session, allowing execution of many commands in one Appium request.
|
|
26
37
|
Please read http://appium.io/docs/en/commands/session/execute-driver for more details about the acceptable
|
|
27
38
|
scripts and the output format.
|
|
@@ -43,18 +54,12 @@ class ExecuteDriver(CanExecuteCommands):
|
|
|
43
54
|
Raises:
|
|
44
55
|
WebDriverException: If something error happens in the script. The message has the original error message.
|
|
45
56
|
"""
|
|
46
|
-
|
|
47
|
-
class Result:
|
|
48
|
-
def __init__(self, res: dict):
|
|
49
|
-
self.result = res['result']
|
|
50
|
-
self.logs = res['logs']
|
|
51
|
-
|
|
52
57
|
option: dict[str, str | int] = {'script': script, 'type': script_type}
|
|
53
58
|
if timeout_ms is not None:
|
|
54
59
|
option['timeout'] = timeout_ms
|
|
55
60
|
|
|
56
61
|
response = self.execute(Command.EXECUTE_DRIVER, option)['value']
|
|
57
|
-
return Result(response)
|
|
62
|
+
return ExecuteDriver.Result(response)
|
|
58
63
|
|
|
59
64
|
def _add_commands(self) -> None:
|
|
60
65
|
self.command_executor.add_command(Command.EXECUTE_DRIVER, 'POST', '/session/$sessionId/appium/execute_driver')
|
|
@@ -188,10 +188,12 @@ class ScreenRecord(CanExecuteCommands):
|
|
|
188
188
|
headers (dict): [multipart/form-data requests] Headers mapping (Since Appium 1.18.0)
|
|
189
189
|
|
|
190
190
|
Usage:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
.. code-block:: python
|
|
192
|
+
|
|
193
|
+
payload = driver.stop_recording_screen()
|
|
194
|
+
with open('media.mp4', "wb") as fd:
|
|
195
|
+
import base64
|
|
196
|
+
fd.write(base64.b64decode(payload))
|
|
195
197
|
|
|
196
198
|
Returns:
|
|
197
199
|
bytes: Base-64 encoded content of the recorded media file or an empty string
|
|
@@ -271,7 +271,7 @@ appium/protocols/webdriver/can_execute_commands.py,sha256=l6Wq-yL-hzCek9djetnrfp
|
|
|
271
271
|
appium/protocols/webdriver/can_execute_scripts.py,sha256=dMRDjreiyV3IJp7-NRUx1TjouOu34mLUa9N6qZPq3b0,962
|
|
272
272
|
appium/protocols/webdriver/can_find_elements.py,sha256=glM-Qpe-_KyLhZmojl6aa82B3xhEzRpJPyVQHhtOP8Q,1492
|
|
273
273
|
appium/webdriver/__init__.py,sha256=oT-lIYWpqD562rbXy36HlS03pKfW48BIxqZsqt1XEm0,730
|
|
274
|
-
appium/webdriver/appium_connection.py,sha256=
|
|
274
|
+
appium/webdriver/appium_connection.py,sha256=qh6LowDI9_6gwPxy50LGD96YTqKwa0ODGM1RUGOSpks,2580
|
|
275
275
|
appium/webdriver/appium_service.py,sha256=lMfbkiHQIccpqy0_kG7qtO1BbTljIJq8aYTcOQ0ErPY,12172
|
|
276
276
|
appium/webdriver/applicationstate.py,sha256=zUPaMt4o4mdAtWP6FapYLJju_tqO6FmMcYFpbFz83dM,735
|
|
277
277
|
appium/webdriver/client_config.py,sha256=iuVcGsBF9eGNsF_gzs8b6vZWS0iI1u7actaBGBwNrqY,1631
|
|
@@ -292,7 +292,7 @@ appium/webdriver/extensions/applications.py,sha256=KnRD9-JilgYtBuy8dik2iGI5GeS2R
|
|
|
292
292
|
appium/webdriver/extensions/clipboard.py,sha256=G0qvK5I5DP87IR8A5ICMC-_mtEPktSCOPKif-RZwX2M,3470
|
|
293
293
|
appium/webdriver/extensions/context.py,sha256=Ldhyld4n_JRu9YhgnIOtF-qZQYsXlYrjdYHStcIV2jA,1994
|
|
294
294
|
appium/webdriver/extensions/device_time.py,sha256=CRponsom_3wAEFuxVa6_zUa7BoFkmGCSIeWzCrPTV1g,2009
|
|
295
|
-
appium/webdriver/extensions/execute_driver.py,sha256=
|
|
295
|
+
appium/webdriver/extensions/execute_driver.py,sha256=UDI3ppN3oEHWgKIRzEhnUMjcjiMo6xWZCaf4MeNPSZw,2744
|
|
296
296
|
appium/webdriver/extensions/execute_mobile_command.py,sha256=a0zxwCTLnrP7ozitzFh0dvXBl2CX3PqLmXRXsLNuWY0,2358
|
|
297
297
|
appium/webdriver/extensions/hw_actions.py,sha256=BCcYzbEW7PbEhf5IPD7Tvr-44sfHfElk_ffi4EhsYF0,4192
|
|
298
298
|
appium/webdriver/extensions/images_comparison.py,sha256=cNdJHn2NFyp9dkFslNLrT4ZRkkKwpELtfrZ0QKXynlU,7674
|
|
@@ -301,7 +301,7 @@ appium/webdriver/extensions/location.py,sha256=id6qK3ufhrpsvcFPLNQU0Mx0yXl7Wvth3
|
|
|
301
301
|
appium/webdriver/extensions/log_event.py,sha256=zF5XoNHSaqFjbGd1bw7gTm-bNOiafTYMgzDJMH2kDj4,2423
|
|
302
302
|
appium/webdriver/extensions/logs.py,sha256=Wlc-aG3arxnVKvjsTAoxU_lHiiPeqe8rdJP3QUEt2mY,1828
|
|
303
303
|
appium/webdriver/extensions/remote_fs.py,sha256=KVYzLpgx7ZIjhRnVmBRPxz4jgSgUqqGrhfx9XBaL31k,3402
|
|
304
|
-
appium/webdriver/extensions/screen_record.py,sha256=
|
|
304
|
+
appium/webdriver/extensions/screen_record.py,sha256=YfdlEtOC_FHtT1B0vXN-MpJQGm2xFvqNlxk2SzKi4HM,13297
|
|
305
305
|
appium/webdriver/extensions/session.py,sha256=P3NSXeIgWHeKK9GDEzkGERIqnIseZDcWUTyAucRpqOg,1414
|
|
306
306
|
appium/webdriver/extensions/settings.py,sha256=WaGFYJ91YK_t9cQJeotxHzp5yYQR7HKoC0DH5Z0VQVs,1921
|
|
307
307
|
appium/webdriver/extensions/android/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -319,7 +319,7 @@ appium/webdriver/extensions/flutter_integration/__init__.py,sha256=wSUl6yC2TJNla
|
|
|
319
319
|
appium/webdriver/extensions/flutter_integration/flutter_commands.py,sha256=FwNqIykRyMAU8-344GTlceBOxLbS-bA9bfGX4iJpHxw,11985
|
|
320
320
|
appium/webdriver/extensions/flutter_integration/flutter_finder.py,sha256=HH9vGAouJuHzp29Jam_lQGrh67PDq6MxU5Ifewf7C5w,2164
|
|
321
321
|
appium/webdriver/extensions/flutter_integration/scroll_directions.py,sha256=CkOv7k21SMe-h2-EYSZ6MBKBGTRC1csQ-tuowHgMn0E,85
|
|
322
|
-
appium_python_client-6.0.
|
|
323
|
-
appium_python_client-6.0.
|
|
324
|
-
appium_python_client-6.0.
|
|
325
|
-
appium_python_client-6.0.
|
|
322
|
+
appium_python_client-6.0.12.dist-info/METADATA,sha256=4-B6Vfcd_WKqdqJytd1zySO73Oukatozsdyd3dPEKww,21274
|
|
323
|
+
appium_python_client-6.0.12.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
324
|
+
appium_python_client-6.0.12.dist-info/licenses/LICENSE,sha256=QxeKfXNmPWCfFyrXiwdVzMFPFMK0nlBrKhYLUoIcqhk,11384
|
|
325
|
+
appium_python_client-6.0.12.dist-info/RECORD,,
|
|
File without changes
|
{appium_python_client-6.0.11.dist-info → appium_python_client-6.0.12.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|