seleniumbase 4.37.11__py3-none-any.whl → 4.38.0__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 +17 -10
- seleniumbase/plugins/sb_manager.py +11 -16
- seleniumbase/undetected/cdp_driver/connection.py +7 -6
- {seleniumbase-4.37.11.dist-info → seleniumbase-4.38.0.dist-info}/METADATA +5 -5
- {seleniumbase-4.37.11.dist-info → seleniumbase-4.38.0.dist-info}/RECORD +10 -10
- {seleniumbase-4.37.11.dist-info → seleniumbase-4.38.0.dist-info}/WHEEL +0 -0
- {seleniumbase-4.37.11.dist-info → seleniumbase-4.38.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.37.11.dist-info → seleniumbase-4.38.0.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.37.11.dist-info → seleniumbase-4.38.0.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.
|
2
|
+
__version__ = "4.38.0"
|
@@ -519,16 +519,6 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
|
|
519
519
|
import asyncio
|
520
520
|
from seleniumbase.undetected.cdp_driver import cdp_util
|
521
521
|
|
522
|
-
if (
|
523
|
-
hasattr(driver, "_is_using_cdp")
|
524
|
-
and driver._is_using_cdp
|
525
|
-
and hasattr(driver, "cdp")
|
526
|
-
and driver.cdp
|
527
|
-
):
|
528
|
-
# CDP Mode was already initialized
|
529
|
-
driver.disconnect()
|
530
|
-
driver.cdp.open(url, **kwargs)
|
531
|
-
return
|
532
522
|
current_url = None
|
533
523
|
try:
|
534
524
|
current_url = driver.current_url
|
@@ -553,6 +543,23 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
|
|
553
543
|
if url_protocol not in ["about", "data", "chrome"]:
|
554
544
|
safe_url = False
|
555
545
|
|
546
|
+
if (
|
547
|
+
hasattr(driver, "_is_using_cdp")
|
548
|
+
and driver._is_using_cdp
|
549
|
+
and hasattr(driver, "cdp")
|
550
|
+
and driver.cdp
|
551
|
+
and hasattr(driver.cdp, "loop")
|
552
|
+
):
|
553
|
+
# CDP Mode was already initialized
|
554
|
+
driver.cdp.open(url, **kwargs)
|
555
|
+
if not safe_url:
|
556
|
+
time.sleep(constants.UC.CDP_MODE_OPEN_WAIT)
|
557
|
+
if IS_WINDOWS:
|
558
|
+
time.sleep(constants.UC.EXTRA_WINDOWS_WAIT)
|
559
|
+
else:
|
560
|
+
time.sleep(0.012)
|
561
|
+
return
|
562
|
+
|
556
563
|
headless = False
|
557
564
|
headed = None
|
558
565
|
xvfb = None
|
@@ -1369,23 +1369,18 @@ def SB(
|
|
1369
1369
|
"%s%s%s%s%s"
|
1370
1370
|
% (c1, left_space, end_text, right_space, cr)
|
1371
1371
|
)
|
1372
|
-
|
1373
|
-
if undetectable:
|
1372
|
+
if undetectable and hasattr(sb, "_drivers_browser_map"):
|
1374
1373
|
import asyncio
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
tasks.append(driver.cdp.driver.connection.aclose())
|
1386
|
-
driver.cdp.loop.run_until_complete(
|
1387
|
-
asyncio.gather(*tasks)
|
1388
|
-
)
|
1374
|
+
for driver in sb._drivers_browser_map.keys():
|
1375
|
+
if (
|
1376
|
+
hasattr(driver, "cdp")
|
1377
|
+
and driver.cdp
|
1378
|
+
and hasattr(driver.cdp, "loop")
|
1379
|
+
):
|
1380
|
+
asyncio.set_event_loop(driver.cdp.loop)
|
1381
|
+
tasks = [tab.aclose() for tab in driver.cdp.get_tabs()]
|
1382
|
+
tasks.append(driver.cdp.driver.connection.aclose())
|
1383
|
+
driver.cdp.loop.run_until_complete(asyncio.gather(*tasks))
|
1389
1384
|
driver.cdp.loop.close()
|
1390
1385
|
gc.collect()
|
1391
1386
|
if test and test_name and not test_passed and raise_test_failure:
|
@@ -19,7 +19,6 @@ from typing import (
|
|
19
19
|
)
|
20
20
|
import websockets
|
21
21
|
from websockets.protocol import State
|
22
|
-
from seleniumbase import config as sb_config
|
23
22
|
from . import cdp_util as util
|
24
23
|
import mycdp as cdp
|
25
24
|
import mycdp.network
|
@@ -271,11 +270,10 @@ class Connection(metaclass=CantTouchThis):
|
|
271
270
|
max_size=MAX_SIZE,
|
272
271
|
)
|
273
272
|
self.listener = Listener(self)
|
274
|
-
sb_config._cdp_aclose = self.aclose
|
275
273
|
except (Exception,) as e:
|
276
274
|
logger.debug("Exception during opening of websocket: %s", e)
|
277
275
|
if self.listener:
|
278
|
-
self.listener.cancel()
|
276
|
+
await self.listener.cancel()
|
279
277
|
raise
|
280
278
|
if not self.listener or not self.listener.running:
|
281
279
|
self.listener = Listener(self)
|
@@ -300,7 +298,7 @@ class Connection(metaclass=CantTouchThis):
|
|
300
298
|
self.websocket_url
|
301
299
|
)
|
302
300
|
if self.listener and self.listener.running:
|
303
|
-
self.listener.cancel()
|
301
|
+
await self.listener.cancel()
|
304
302
|
self.enabled_domains.clear()
|
305
303
|
logger.debug(
|
306
304
|
"\n❌ Closed websocket connection to %s", self.websocket_url
|
@@ -446,7 +444,6 @@ class Connection(metaclass=CantTouchThis):
|
|
446
444
|
if not _is_update:
|
447
445
|
await self._register_handlers()
|
448
446
|
await self.websocket.send(tx.message)
|
449
|
-
sb_config._cdp_aclose = self.aclose
|
450
447
|
try:
|
451
448
|
return await tx
|
452
449
|
except ProtocolException as e:
|
@@ -557,9 +554,13 @@ class Listener:
|
|
557
554
|
def time_before_considered_idle(self, seconds: Union[int, float]):
|
558
555
|
self._time_before_considered_idle = seconds
|
559
556
|
|
560
|
-
def cancel(self):
|
557
|
+
async def cancel(self):
|
561
558
|
if self.task and not self.task.cancelled():
|
562
559
|
self.task.cancel()
|
560
|
+
try:
|
561
|
+
await self.task
|
562
|
+
except asyncio.CancelledError:
|
563
|
+
pass
|
563
564
|
|
564
565
|
@property
|
565
566
|
def running(self):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.38.0
|
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,7 +60,7 @@ Requires-Python: >=3.8
|
|
60
60
|
Description-Content-Type: text/markdown
|
61
61
|
License-File: LICENSE
|
62
62
|
Requires-Dist: pip>=25.0.1; python_version < "3.9"
|
63
|
-
Requires-Dist: pip>=25.1; python_version >= "3.9"
|
63
|
+
Requires-Dist: pip>=25.1.1; python_version >= "3.9"
|
64
64
|
Requires-Dist: packaging>=25.0
|
65
65
|
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
66
66
|
Requires-Dist: setuptools>=80.1.0; python_version >= "3.10"
|
@@ -93,7 +93,7 @@ Requires-Dist: tabcompleter>=1.4.0
|
|
93
93
|
Requires-Dist: pdbp>=1.7.0
|
94
94
|
Requires-Dist: idna==3.10
|
95
95
|
Requires-Dist: chardet==5.2.0
|
96
|
-
Requires-Dist: charset-normalizer
|
96
|
+
Requires-Dist: charset-normalizer<4,>=3.4.2
|
97
97
|
Requires-Dist: urllib3<2,>=1.26.20; python_version < "3.10"
|
98
98
|
Requires-Dist: urllib3<2.5.0,>=1.26.20; python_version >= "3.10"
|
99
99
|
Requires-Dist: requests==2.32.3
|
@@ -106,7 +106,7 @@ Requires-Dist: trio-websocket==0.12.2
|
|
106
106
|
Requires-Dist: wsproto==1.2.0
|
107
107
|
Requires-Dist: websocket-client==1.8.0
|
108
108
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
109
|
-
Requires-Dist: selenium==4.
|
109
|
+
Requires-Dist: selenium==4.32.0; python_version >= "3.9"
|
110
110
|
Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
111
111
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
112
112
|
Requires-Dist: sortedcontainers==2.4.0
|
@@ -156,7 +156,7 @@ Provides-Extra: pdfminer
|
|
156
156
|
Requires-Dist: pdfminer.six==20250324; python_version < "3.9" and extra == "pdfminer"
|
157
157
|
Requires-Dist: pdfminer.six==20250416; python_version >= "3.9" and extra == "pdfminer"
|
158
158
|
Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
|
159
|
-
Requires-Dist: cryptography==44.0.
|
159
|
+
Requires-Dist: cryptography==44.0.3; python_version >= "3.9" and extra == "pdfminer"
|
160
160
|
Requires-Dist: cffi==1.17.1; extra == "pdfminer"
|
161
161
|
Requires-Dist: pycparser==2.22; extra == "pdfminer"
|
162
162
|
Provides-Extra: pillow
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=_WvAjydKqZfTdnZW9LPKkRty-g-lfdUPmLqnZj6ulcs,43013
|
4
4
|
seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=dkLMtZE7ayzjDwvmPUjs7BJljl0YEr3nJ7tpeg7BnVE,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=qQF85LoohJBfrPK5ZcPi50v-pWtOrC9qcN1B3Ki_3tY,59401
|
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
|
|
36
36
|
seleniumbase/console_scripts/sb_recorder.py,sha256=fnHb5-kh11Hit-E9Ha-e4QXzqLcZvtij6mb5qNd4B1Q,11032
|
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=zJA711W1oxePyDl-dDbtnu2435AB9N87-IkJUXNk1U0,240517
|
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
|
@@ -90,7 +90,7 @@ seleniumbase/plugins/driver_manager.py,sha256=1l4fxISvGV62gfDxp3yfYE2zz4WKJFLE0t
|
|
90
90
|
seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
|
91
91
|
seleniumbase/plugins/pytest_plugin.py,sha256=952AIyaH-PdmNksoeXjzhXxoc8Z53yV-WPjlrHhp2OM,108382
|
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=o1cWTR3ARb9AAa1bljpsmS89lB-pt0TSEVz1lUpzq8U,58018
|
94
94
|
seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
|
95
95
|
seleniumbase/plugins/selenium_plugin.py,sha256=y0eNco8T4KgGLProLPHPLw479QH5lRms4wqwOnTgkSc,60081
|
96
96
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -118,7 +118,7 @@ seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV
|
|
118
118
|
seleniumbase/undetected/cdp_driver/browser.py,sha256=9JGyDIQftCY-u3ega6gO5PTSxkHs7x9ykJszCdyugLo,32814
|
119
119
|
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=flVpVu9o_2zgWFZFEkmfp8fJ6ewTTAJuZmiWm4hz-TA,24093
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=t8KV1Vqa5SQRBq3-gjkHHmj9h85AplAM01asO3AWufs,12507
|
121
|
-
seleniumbase/undetected/cdp_driver/connection.py,sha256=
|
121
|
+
seleniumbase/undetected/cdp_driver/connection.py,sha256=d5G4MkCaDCv8ErtOCPB5hnr18kIZMuaGx8o0DKS0HNY,24559
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
|
123
123
|
seleniumbase/undetected/cdp_driver/tab.py,sha256=wRfeoJwed9OO7SsvdWRIfRRduNFDT1Rl-mBACHf3ZKM,53077
|
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.
|
139
|
-
seleniumbase-4.
|
140
|
-
seleniumbase-4.
|
141
|
-
seleniumbase-4.
|
142
|
-
seleniumbase-4.
|
143
|
-
seleniumbase-4.
|
138
|
+
seleniumbase-4.38.0.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.38.0.dist-info/METADATA,sha256=MEjTvqnBfGMTc5sija9wSdPKTju6Yl3kxevB_YpVPyE,86958
|
140
|
+
seleniumbase-4.38.0.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
141
|
+
seleniumbase-4.38.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.38.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.38.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|