seleniumbase 4.32.8__py3-none-any.whl → 4.32.9__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.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/browser_launcher.py +6 -0
- seleniumbase/core/sb_cdp.py +39 -0
- seleniumbase/plugins/driver_manager.py +1 -5
- seleniumbase/plugins/sb_manager.py +1 -5
- seleniumbase/undetected/cdp_driver/connection.py +4 -3
- {seleniumbase-4.32.8.dist-info → seleniumbase-4.32.9.dist-info}/METADATA +5 -4
- {seleniumbase-4.32.8.dist-info → seleniumbase-4.32.9.dist-info}/RECORD +12 -12
- {seleniumbase-4.32.8.dist-info → seleniumbase-4.32.9.dist-info}/LICENSE +0 -0
- {seleniumbase-4.32.8.dist-info → seleniumbase-4.32.9.dist-info}/WHEEL +0 -0
- {seleniumbase-4.32.8.dist-info → seleniumbase-4.32.9.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.32.8.dist-info → seleniumbase-4.32.9.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.32.
|
2
|
+
__version__ = "4.32.9"
|
@@ -620,6 +620,9 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
620
620
|
cdp.reset_window_size = CDPM.reset_window_size
|
621
621
|
cdp.set_locale = CDPM.set_locale
|
622
622
|
cdp.set_attributes = CDPM.set_attributes
|
623
|
+
cdp.gui_press_key = CDPM.gui_press_key
|
624
|
+
cdp.gui_press_keys = CDPM.gui_press_keys
|
625
|
+
cdp.gui_write = CDPM.gui_write
|
623
626
|
cdp.gui_click_x_y = CDPM.gui_click_x_y
|
624
627
|
cdp.gui_click_element = CDPM.gui_click_element
|
625
628
|
cdp.internalize_links = CDPM.internalize_links
|
@@ -721,6 +724,9 @@ def uc_click(
|
|
721
724
|
timeout=settings.SMALL_TIMEOUT,
|
722
725
|
reconnect_time=None,
|
723
726
|
):
|
727
|
+
if __is_cdp_swap_needed(driver):
|
728
|
+
driver.cdp.click(selector)
|
729
|
+
return
|
724
730
|
with suppress(Exception):
|
725
731
|
rct = float(by) # Add shortcut: driver.uc_click(selector, RCT)
|
726
732
|
if not reconnect_time:
|
seleniumbase/core/sb_cdp.py
CHANGED
@@ -942,6 +942,45 @@ class CDPMethods():
|
|
942
942
|
)
|
943
943
|
return pyautogui_copy
|
944
944
|
|
945
|
+
def gui_press_key(self, key):
|
946
|
+
self.__install_pyautogui_if_missing()
|
947
|
+
import pyautogui
|
948
|
+
pyautogui = self.__get_configured_pyautogui(pyautogui)
|
949
|
+
gui_lock = fasteners.InterProcessLock(
|
950
|
+
constants.MultiBrowser.PYAUTOGUILOCK
|
951
|
+
)
|
952
|
+
with gui_lock:
|
953
|
+
pyautogui.press(key)
|
954
|
+
time.sleep(0.0375)
|
955
|
+
self.__slow_mode_pause_if_set()
|
956
|
+
self.loop.run_until_complete(self.page.wait())
|
957
|
+
|
958
|
+
def gui_press_keys(self, keys):
|
959
|
+
self.__install_pyautogui_if_missing()
|
960
|
+
import pyautogui
|
961
|
+
pyautogui = self.__get_configured_pyautogui(pyautogui)
|
962
|
+
gui_lock = fasteners.InterProcessLock(
|
963
|
+
constants.MultiBrowser.PYAUTOGUILOCK
|
964
|
+
)
|
965
|
+
with gui_lock:
|
966
|
+
for key in keys:
|
967
|
+
pyautogui.press(key)
|
968
|
+
time.sleep(0.0375)
|
969
|
+
self.__slow_mode_pause_if_set()
|
970
|
+
self.loop.run_until_complete(self.page.wait())
|
971
|
+
|
972
|
+
def gui_write(self, text):
|
973
|
+
self.__install_pyautogui_if_missing()
|
974
|
+
import pyautogui
|
975
|
+
pyautogui = self.__get_configured_pyautogui(pyautogui)
|
976
|
+
gui_lock = fasteners.InterProcessLock(
|
977
|
+
constants.MultiBrowser.PYAUTOGUILOCK
|
978
|
+
)
|
979
|
+
with gui_lock:
|
980
|
+
pyautogui.write(text)
|
981
|
+
self.__slow_mode_pause_if_set()
|
982
|
+
self.loop.run_until_complete(self.page.wait())
|
983
|
+
|
945
984
|
def __gui_click_x_y(self, x, y, timeframe=0.25, uc_lock=False):
|
946
985
|
self.__install_pyautogui_if_missing()
|
947
986
|
import pyautogui
|
@@ -550,11 +550,7 @@ def Driver(
|
|
550
550
|
or uc_sub
|
551
551
|
):
|
552
552
|
undetectable = True
|
553
|
-
if
|
554
|
-
(undetectable or undetected or uc)
|
555
|
-
and (uc_subprocess is None)
|
556
|
-
and (uc_sub is None)
|
557
|
-
):
|
553
|
+
if undetectable or undetected or uc:
|
558
554
|
uc_subprocess = True # Use UC as a subprocess by default.
|
559
555
|
elif (
|
560
556
|
"--undetectable" in sys_argv
|
@@ -608,11 +608,7 @@ def SB(
|
|
608
608
|
or uc_sub
|
609
609
|
):
|
610
610
|
undetectable = True
|
611
|
-
if
|
612
|
-
(undetectable or undetected or uc)
|
613
|
-
and (uc_subprocess is None)
|
614
|
-
and (uc_sub is None)
|
615
|
-
):
|
611
|
+
if undetectable or undetected or uc:
|
616
612
|
uc_subprocess = True # Use UC as a subprocess by default.
|
617
613
|
elif (
|
618
614
|
"--undetectable" in sys_argv
|
@@ -18,6 +18,7 @@ from typing import (
|
|
18
18
|
TypeVar,
|
19
19
|
)
|
20
20
|
import websockets
|
21
|
+
from websockets.protocol import State
|
21
22
|
from . import cdp_util as util
|
22
23
|
import mycdp as cdp
|
23
24
|
import mycdp.network
|
@@ -261,7 +262,7 @@ class Connection(metaclass=CantTouchThis):
|
|
261
262
|
"""
|
262
263
|
Opens the websocket connection. Shouldn't be called manually by users.
|
263
264
|
"""
|
264
|
-
if not self.websocket or self.websocket.
|
265
|
+
if not self.websocket or self.websocket.state is State.CLOSED:
|
265
266
|
try:
|
266
267
|
self.websocket = await websockets.connect(
|
267
268
|
self.websocket_url,
|
@@ -288,7 +289,7 @@ class Connection(metaclass=CantTouchThis):
|
|
288
289
|
"""
|
289
290
|
Closes the websocket connection. Shouldn't be called manually by users.
|
290
291
|
"""
|
291
|
-
if self.websocket and
|
292
|
+
if self.websocket and self.websocket.state is not State.CLOSED:
|
292
293
|
if self.listener and self.listener.running:
|
293
294
|
self.listener.cancel()
|
294
295
|
self.enabled_domains.clear()
|
@@ -393,7 +394,7 @@ class Connection(metaclass=CantTouchThis):
|
|
393
394
|
when multiple calls to connection.send() are made.
|
394
395
|
"""
|
395
396
|
await self.aopen()
|
396
|
-
if not self.websocket or self.
|
397
|
+
if not self.websocket or self.websocket.state is State.CLOSED:
|
397
398
|
return
|
398
399
|
if self._owner:
|
399
400
|
browser = self._owner
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.32.
|
3
|
+
Version: 4.32.9
|
4
4
|
Summary: A complete web automation framework for end-to-end testing.
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
6
6
|
Author: Michael Mintz
|
@@ -60,12 +60,11 @@ Requires-Python: >=3.8
|
|
60
60
|
Description-Content-Type: text/markdown
|
61
61
|
License-File: LICENSE
|
62
62
|
Requires-Dist: pip>=24.2
|
63
|
-
Requires-Dist: packaging>=24.
|
64
|
-
Requires-Dist: wheel>=0.
|
63
|
+
Requires-Dist: packaging>=24.2
|
64
|
+
Requires-Dist: wheel>=0.45.0
|
65
65
|
Requires-Dist: attrs>=24.2.0
|
66
66
|
Requires-Dist: certifi>=2024.8.30
|
67
67
|
Requires-Dist: exceptiongroup>=1.2.2
|
68
|
-
Requires-Dist: websockets>=13.1
|
69
68
|
Requires-Dist: filelock>=3.16.1
|
70
69
|
Requires-Dist: fasteners>=0.19
|
71
70
|
Requires-Dist: mycdp>=1.0.1
|
@@ -117,8 +116,10 @@ Requires-Dist: python-xlib==0.33; platform_system == "Linux"
|
|
117
116
|
Requires-Dist: pyreadline3>=3.5.3; platform_system == "Windows"
|
118
117
|
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
119
118
|
Requires-Dist: urllib3<2,>=1.26.20; python_version < "3.10"
|
119
|
+
Requires-Dist: websockets~=13.1; python_version < "3.9"
|
120
120
|
Requires-Dist: setuptools>=73.0.1; python_version >= "3.10"
|
121
121
|
Requires-Dist: urllib3<2.3.0,>=1.26.20; python_version >= "3.10"
|
122
|
+
Requires-Dist: websockets>=14.0; python_version >= "3.9"
|
122
123
|
Provides-Extra: allure
|
123
124
|
Requires-Dist: allure-pytest>=2.13.5; extra == "allure"
|
124
125
|
Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
|
4
4
|
seleniumbase/__init__.py,sha256=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=am_TdSeFJWZgGKFn3vmM8ge4vQM8qlkXsvTrl75KN2M,46
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=-hza7Nx2U41mSObYiPMi48v3JlPh3sJO3yzP0kqZ1Gk,59174
|
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
|
|
36
36
|
seleniumbase/console_scripts/sb_recorder.py,sha256=1oAA4wFzVboNhIFDwJLD3jgy9RuoavywKQG7R67bNZE,10908
|
37
37
|
seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
|
39
|
-
seleniumbase/core/browser_launcher.py,sha256=
|
39
|
+
seleniumbase/core/browser_launcher.py,sha256=HG8_3PsRDx1acbA0ZW9DO_cYjkPy3OfDOvHaZnFUwJM,217440
|
40
40
|
seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
|
41
41
|
seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
|
42
42
|
seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
|
@@ -50,7 +50,7 @@ seleniumbase/core/proxy_helper.py,sha256=cXhu8ErK9Vjdm82RMaQj7hEq_yUWizSp6LyiD50
|
|
50
50
|
seleniumbase/core/recorder_helper.py,sha256=fNGjbapXmEsht54x1o6Igk198QdnPxDDnjUOzQxNhNQ,25055
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=bkeI8I4y19ebWuQG1oEZV5qJbotC6eN8vin31OCNWJk,3521
|
53
|
-
seleniumbase/core/sb_cdp.py,sha256=
|
53
|
+
seleniumbase/core/sb_cdp.py,sha256=4dp20r_KSK8n8nhqzqPMTk48nXt16wzGKSW2v63j_p0,45560
|
54
54
|
seleniumbase/core/sb_driver.py,sha256=-k4vHwMnuiBIkdVInTtJA-IDLrgQfyMhNxSHMIsjepw,11623
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=KokVXpCiGZhJ-D4Bo-hizPz5r-iefzWoiTANu9zNaq4,7504
|
@@ -86,11 +86,11 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
86
86
|
seleniumbase/plugins/base_plugin.py,sha256=FemdftNhOaTfQIw5bWcJQPPPGQ3P0_sMEI_YYDuzZgU,14972
|
87
87
|
seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2ny6rR9AMWk,2108
|
88
88
|
seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
|
89
|
-
seleniumbase/plugins/driver_manager.py,sha256=
|
89
|
+
seleniumbase/plugins/driver_manager.py,sha256=s20s0pJYaNrG0WNwyIC04oUMRVFjtm6V_nS1-EvFm7g,34492
|
90
90
|
seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
|
91
91
|
seleniumbase/plugins/pytest_plugin.py,sha256=Up96HY6q3hcPo4LQoEcKqt1hm2OmY5GZz_nMXTqDSXQ,97185
|
92
92
|
seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
|
93
|
-
seleniumbase/plugins/sb_manager.py,sha256=
|
93
|
+
seleniumbase/plugins/sb_manager.py,sha256=_Uefqpopw6M5NZq7WRi5sXyPMSyaCtBA7oSXObhlvM8,54250
|
94
94
|
seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
|
95
95
|
seleniumbase/plugins/selenium_plugin.py,sha256=GhGW2ATy2kM7UH7NrZ2je402nN2LMlVHpM-yxlU3I9E,59069
|
96
96
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -118,7 +118,7 @@ seleniumbase/undetected/cdp_driver/_contradict.py,sha256=6thDYeoEGiC7Q3tXLgoD_Ah
|
|
118
118
|
seleniumbase/undetected/cdp_driver/browser.py,sha256=mGmpWuR206yYJoBPTNslru8CbEpQuvvIHdjBylSkoKg,30020
|
119
119
|
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=Erfb62fzpvGr0QIIJOiqvGkyoyBakHOIwgbrQ7dqUgM,16625
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=Rjvde7V-XJ0ihZdTmOmHEVWSuDWm3SprQ3njg8SN3Go,12087
|
121
|
-
seleniumbase/undetected/cdp_driver/connection.py,sha256=
|
121
|
+
seleniumbase/undetected/cdp_driver/connection.py,sha256=sOTUGjbUqKA2hPvDcRCdqw1VQjVGJs7mbgVvzS7ldtE,23360
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=9oD9GxguctunrlHV3lWXlZgb9cNEjD5x03Oy84OqyVA,39631
|
123
123
|
seleniumbase/undetected/cdp_driver/tab.py,sha256=wUNF8GHrbhaUqg57A9ZTYHKhNPjZIcOHwrz3pj1SAg0,50526
|
124
124
|
seleniumbase/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -135,9 +135,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
135
135
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
136
136
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
137
137
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
|
138
|
-
seleniumbase-4.32.
|
139
|
-
seleniumbase-4.32.
|
140
|
-
seleniumbase-4.32.
|
141
|
-
seleniumbase-4.32.
|
142
|
-
seleniumbase-4.32.
|
143
|
-
seleniumbase-4.32.
|
138
|
+
seleniumbase-4.32.9.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
139
|
+
seleniumbase-4.32.9.dist-info/METADATA,sha256=nd96od-BctakXK-zGmDPiKl4Ymfsz91frtzdx2s_rtg,86461
|
140
|
+
seleniumbase-4.32.9.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
141
|
+
seleniumbase-4.32.9.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.32.9.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.32.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|