Appium-Python-Client 6.1.0__py3-none-any.whl → 6.1.1__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_service.py +15 -3
- {appium_python_client-6.1.0.dist-info → appium_python_client-6.1.1.dist-info}/METADATA +1 -1
- {appium_python_client-6.1.0.dist-info → appium_python_client-6.1.1.dist-info}/RECORD +5 -5
- {appium_python_client-6.1.0.dist-info → appium_python_client-6.1.1.dist-info}/WHEEL +0 -0
- {appium_python_client-6.1.0.dist-info → appium_python_client-6.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -27,6 +27,7 @@ from selenium.webdriver.remote.remote_connection import urllib3
|
|
|
27
27
|
DEFAULT_HOST = '127.0.0.1'
|
|
28
28
|
DEFAULT_PORT = 4723
|
|
29
29
|
STARTUP_TIMEOUT_MS = 60000
|
|
30
|
+
STOP_TIMEOUT_SEC = 5.5
|
|
30
31
|
STATE_CHECK_INTERVAL_MS = 500
|
|
31
32
|
MAIN_SCRIPT_PATH = 'appium/build/lib/main.js'
|
|
32
33
|
STATUS_URL = '/status'
|
|
@@ -124,15 +125,26 @@ class AppiumService:
|
|
|
124
125
|
error_msg = startup_failure_msg
|
|
125
126
|
if error_msg is not None:
|
|
126
127
|
if stderr == sp.PIPE and self._process.stderr is not None:
|
|
127
|
-
#
|
|
128
|
-
|
|
128
|
+
# The server might still be running, for example if it does not listen on the expected URL.
|
|
129
|
+
# Reading its stderr before the process exits would block forever, so terminate it first.
|
|
130
|
+
self._process.terminate()
|
|
131
|
+
try:
|
|
132
|
+
_, err_output = self._process.communicate(timeout=STOP_TIMEOUT_SEC)
|
|
133
|
+
except sp.TimeoutExpired:
|
|
134
|
+
# The server ignored the termination request. Kill it, so its error output is not lost.
|
|
135
|
+
self._process.kill()
|
|
136
|
+
try:
|
|
137
|
+
_, err_output = self._process.communicate(timeout=STOP_TIMEOUT_SEC)
|
|
138
|
+
except sp.TimeoutExpired as e:
|
|
139
|
+
# Another process might still hold stderr open. Keep the output read so far.
|
|
140
|
+
err_output = e.stderr or b''
|
|
129
141
|
if err_output:
|
|
130
142
|
error_msg += f'\nOriginal error: {str(err_output)}'
|
|
131
143
|
self.stop()
|
|
132
144
|
raise AppiumServiceError(error_msg)
|
|
133
145
|
return self._process
|
|
134
146
|
|
|
135
|
-
def stop(self, timeout: float =
|
|
147
|
+
def stop(self, timeout: float = STOP_TIMEOUT_SEC) -> bool:
|
|
136
148
|
"""Stops Appium service if it is running.
|
|
137
149
|
|
|
138
150
|
The call will be ignored if the service is not running
|
|
@@ -272,7 +272,7 @@ appium/protocols/webdriver/can_execute_scripts.py,sha256=dMRDjreiyV3IJp7-NRUx1Tj
|
|
|
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
274
|
appium/webdriver/appium_connection.py,sha256=qh6LowDI9_6gwPxy50LGD96YTqKwa0ODGM1RUGOSpks,2580
|
|
275
|
-
appium/webdriver/appium_service.py,sha256=
|
|
275
|
+
appium/webdriver/appium_service.py,sha256=cBxkn8EqwtX2NwbcNmae83KwYxdhdZIAWo2zhFxbcYk,12975
|
|
276
276
|
appium/webdriver/applicationstate.py,sha256=zUPaMt4o4mdAtWP6FapYLJju_tqO6FmMcYFpbFz83dM,735
|
|
277
277
|
appium/webdriver/client_config.py,sha256=iuVcGsBF9eGNsF_gzs8b6vZWS0iI1u7actaBGBwNrqY,1631
|
|
278
278
|
appium/webdriver/clipboard_content_type.py,sha256=Tyks8xA2dqvuQGEV4iVYr-iMvB-hsQBEcu8wWBxtJ4M,661
|
|
@@ -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.1.
|
|
323
|
-
appium_python_client-6.1.
|
|
324
|
-
appium_python_client-6.1.
|
|
325
|
-
appium_python_client-6.1.
|
|
322
|
+
appium_python_client-6.1.1.dist-info/METADATA,sha256=zlYARy-DslHhO-EEqR1BlcpyiVlnKPQ43PSL_d6UVUo,21766
|
|
323
|
+
appium_python_client-6.1.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
324
|
+
appium_python_client-6.1.1.dist-info/licenses/LICENSE,sha256=QxeKfXNmPWCfFyrXiwdVzMFPFMK0nlBrKhYLUoIcqhk,11384
|
|
325
|
+
appium_python_client-6.1.1.dist-info/RECORD,,
|
|
File without changes
|
{appium_python_client-6.1.0.dist-info → appium_python_client-6.1.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|