mops 3.5.0__tar.gz → 3.5.2__tar.gz
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.
- {mops-3.5.0 → mops-3.5.2}/PKG-INFO +1 -1
- {mops-3.5.0 → mops-3.5.2}/mops/__init__.py +1 -1
- {mops-3.5.0 → mops-3.5.2}/mops/abstraction/driver_wrapper_abc.py +2 -0
- {mops-3.5.0 → mops-3.5.2}/mops/base/driver_wrapper.py +2 -0
- {mops-3.5.0 → mops-3.5.2}/mops/playwright/play_driver.py +14 -4
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/core/core_driver.py +6 -1
- {mops-3.5.0 → mops-3.5.2}/mops/utils/decorators.py +1 -3
- {mops-3.5.0 → mops-3.5.2}/mops.egg-info/PKG-INFO +1 -1
- {mops-3.5.0 → mops-3.5.2}/README.md +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/abstraction/element_abc.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/abstraction/mixin_abc.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/abstraction/page_abc.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/base/element.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/base/group.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/base/page.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/exceptions.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/js_scripts.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/keyboard_keys.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/capabilities.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/driver_mixin.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/internal_mixin.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/native_context.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/box.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/driver.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/location.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/locator.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/locator_type.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/scrolls.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/size.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/visual_comaprison_mixin.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/mixins/objects/wait_result.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/playwright/play_element.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/playwright/play_page.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/core/core_element.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/core/core_page.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/driver/mobile_driver.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/driver/web_driver.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/elements/mobile_element.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/elements/web_element.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/pages/mobile_page.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/pages/web_page.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/selenium/sel_utils.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/shared_utils.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/utils/internal_utils.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/utils/logs.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/utils/previous_object_driver.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/utils/selector_synchronizer.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops/visual_comparison.py +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops.egg-info/SOURCES.txt +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops.egg-info/dependency_links.txt +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops.egg-info/requires.txt +0 -0
- {mops-3.5.0 → mops-3.5.2}/mops.egg-info/top_level.txt +0 -0
- {mops-3.5.0 → mops-3.5.2}/pyproject.toml +0 -0
- {mops-3.5.0 → mops-3.5.2}/setup.cfg +0 -0
|
@@ -128,6 +128,8 @@ class DriverWrapper(InternalMixin, Logging, DriverWrapperABC):
|
|
|
128
128
|
is_simulator: bool = False
|
|
129
129
|
is_real_device: bool = False
|
|
130
130
|
|
|
131
|
+
is_cdp: bool = False
|
|
132
|
+
|
|
131
133
|
browser_name: str | None = None
|
|
132
134
|
|
|
133
135
|
def __new__(cls, *args: Any, **kwargs: Any) -> Self:
|
|
@@ -175,12 +175,19 @@ class PlayDriver(Logging, DriverWrapperABC):
|
|
|
175
175
|
|
|
176
176
|
:return: :obj:`None`
|
|
177
177
|
"""
|
|
178
|
-
if trace_path:
|
|
178
|
+
if trace_path and not self.is_cdp:
|
|
179
179
|
with contextlib.suppress(PlaywrightError):
|
|
180
180
|
self.context.tracing.stop(path=trace_path)
|
|
181
181
|
|
|
182
|
-
self.
|
|
183
|
-
|
|
182
|
+
if self.is_cdp:
|
|
183
|
+
with contextlib.suppress(PlaywrightError):
|
|
184
|
+
self._base_driver.close()
|
|
185
|
+
|
|
186
|
+
with contextlib.suppress(PlaywrightError):
|
|
187
|
+
self.context.close()
|
|
188
|
+
else:
|
|
189
|
+
self._base_driver.close()
|
|
190
|
+
self.context.close()
|
|
184
191
|
|
|
185
192
|
def set_cookie(self, cookies: list[dict]) -> PlayDriver:
|
|
186
193
|
"""
|
|
@@ -298,7 +305,10 @@ class PlayDriver(Logging, DriverWrapperABC):
|
|
|
298
305
|
|
|
299
306
|
:return: The size of the inner window as a :class:`.Size` object.
|
|
300
307
|
"""
|
|
301
|
-
|
|
308
|
+
viewport = self.driver.viewport_size
|
|
309
|
+
if viewport is None:
|
|
310
|
+
return Size(width=0, height=0)
|
|
311
|
+
return Size(**viewport)
|
|
302
312
|
|
|
303
313
|
def get_window_size(self) -> Size:
|
|
304
314
|
"""
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import contextlib
|
|
3
4
|
from functools import cached_property
|
|
4
5
|
import time
|
|
5
6
|
from typing import TYPE_CHECKING, Any
|
|
@@ -223,7 +224,11 @@ class CoreDriver(Logging, DriverWrapperABC):
|
|
|
223
224
|
|
|
224
225
|
:return: :obj:`None`
|
|
225
226
|
"""
|
|
226
|
-
self.
|
|
227
|
+
if self.is_cdp:
|
|
228
|
+
with contextlib.suppress(SeleniumWebDriverException):
|
|
229
|
+
self.driver.quit()
|
|
230
|
+
else:
|
|
231
|
+
self.driver.quit()
|
|
227
232
|
|
|
228
233
|
def set_cookie(self, cookies: list[dict]) -> CoreDriver:
|
|
229
234
|
"""
|
|
@@ -69,7 +69,6 @@ def wait_condition(method: Callable) -> Callable:
|
|
|
69
69
|
validate_timeout(timeout)
|
|
70
70
|
validate_silent(silent)
|
|
71
71
|
|
|
72
|
-
should_increase_delay = self.driver_wrapper.is_appium
|
|
73
72
|
delay = WAIT_METHODS_DELAY
|
|
74
73
|
is_log_needed = not silent
|
|
75
74
|
start_time = time.time()
|
|
@@ -89,8 +88,7 @@ def wait_condition(method: Callable) -> Callable:
|
|
|
89
88
|
|
|
90
89
|
time.sleep(delay)
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
delay = increase_delay(delay)
|
|
91
|
+
delay = increase_delay(delay)
|
|
94
92
|
|
|
95
93
|
result.exc._timeout = timeout
|
|
96
94
|
raise result.exc
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|