seleniumbase 4.37.10__py3-none-any.whl → 4.37.11__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 +10 -0
- seleniumbase/fixtures/base_case.py +12 -0
- seleniumbase/plugins/sb_manager.py +16 -7
- seleniumbase/undetected/__init__.py +1 -3
- seleniumbase/undetected/cdp_driver/connection.py +3 -0
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.11.dist-info}/METADATA +2 -2
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.11.dist-info}/RECORD +12 -12
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.11.dist-info}/WHEEL +1 -1
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.11.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.11.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.11.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.37.
|
2
|
+
__version__ = "4.37.11"
|
@@ -519,6 +519,16 @@ 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
|
522
532
|
current_url = None
|
523
533
|
try:
|
524
534
|
current_url = driver.current_url
|
@@ -3534,12 +3534,24 @@ class BaseCase(unittest.TestCase):
|
|
3534
3534
|
|
3535
3535
|
def set_window_size(self, width, height):
|
3536
3536
|
self.__check_scope()
|
3537
|
+
if self.__is_cdp_swap_needed():
|
3538
|
+
position = self.cdp.get_window_position()
|
3539
|
+
x = position["x"]
|
3540
|
+
y = position["y"]
|
3541
|
+
self.cdp.set_window_rect(x, y, width, height)
|
3542
|
+
return
|
3537
3543
|
self._check_browser()
|
3538
3544
|
self.driver.set_window_size(width, height)
|
3539
3545
|
self.__demo_mode_pause_if_active(tiny=True)
|
3540
3546
|
|
3541
3547
|
def set_window_position(self, x, y):
|
3542
3548
|
self.__check_scope()
|
3549
|
+
if self.__is_cdp_swap_needed():
|
3550
|
+
size = self.cdp.get_window_size()
|
3551
|
+
width = size["width"]
|
3552
|
+
height = size["height"]
|
3553
|
+
self.cdp.set_window_rect(x, y, width, height)
|
3554
|
+
return
|
3543
3555
|
self._check_browser()
|
3544
3556
|
self.driver.set_window_position(x, y)
|
3545
3557
|
self.__demo_mode_pause_if_active(tiny=True)
|
@@ -1369,14 +1369,23 @@ def SB(
|
|
1369
1369
|
"%s%s%s%s%s"
|
1370
1370
|
% (c1, left_space, end_text, right_space, cr)
|
1371
1371
|
)
|
1372
|
-
|
1372
|
+
python3_12_or_newer = (sys.version_info >= (3, 12))
|
1373
|
+
if undetectable:
|
1373
1374
|
import asyncio
|
1374
|
-
|
1375
|
-
|
1376
|
-
asyncio.
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1375
|
+
if not python3_12_or_newer and hasattr(sb_config, "_cdp_aclose"):
|
1376
|
+
with suppress(Exception):
|
1377
|
+
loop = asyncio.get_event_loop()
|
1378
|
+
asyncio.set_event_loop(loop)
|
1379
|
+
loop.run_until_complete(sb_config._cdp_aclose())
|
1380
|
+
if python3_12_or_newer and hasattr(sb, "_drivers_browser_map"):
|
1381
|
+
for driver in sb._drivers_browser_map.keys():
|
1382
|
+
if hasattr(driver, "cdp") and driver.cdp:
|
1383
|
+
asyncio.set_event_loop(driver.cdp.loop)
|
1384
|
+
tasks = [tab.aclose() for tab in driver.cdp.get_tabs()]
|
1385
|
+
tasks.append(driver.cdp.driver.connection.aclose())
|
1386
|
+
driver.cdp.loop.run_until_complete(
|
1387
|
+
asyncio.gather(*tasks)
|
1388
|
+
)
|
1380
1389
|
driver.cdp.loop.close()
|
1381
1390
|
gc.collect()
|
1382
1391
|
if test and test_name and not test_passed and raise_test_failure:
|
@@ -523,9 +523,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
523
523
|
with suppress(Exception):
|
524
524
|
for window_handle in self.window_handles:
|
525
525
|
self.switch_to.window(window_handle)
|
526
|
-
if self.current_url.startswith(
|
527
|
-
"chrome-extension://"
|
528
|
-
):
|
526
|
+
if self.current_url.startswith("chrome-extension://"):
|
529
527
|
# https://issues.chromium.org/issues/396611138
|
530
528
|
# (Remove the Linux conditional when resolved)
|
531
529
|
# (So that close() is always called)
|
@@ -19,6 +19,7 @@ from typing import (
|
|
19
19
|
)
|
20
20
|
import websockets
|
21
21
|
from websockets.protocol import State
|
22
|
+
from seleniumbase import config as sb_config
|
22
23
|
from . import cdp_util as util
|
23
24
|
import mycdp as cdp
|
24
25
|
import mycdp.network
|
@@ -270,6 +271,7 @@ class Connection(metaclass=CantTouchThis):
|
|
270
271
|
max_size=MAX_SIZE,
|
271
272
|
)
|
272
273
|
self.listener = Listener(self)
|
274
|
+
sb_config._cdp_aclose = self.aclose
|
273
275
|
except (Exception,) as e:
|
274
276
|
logger.debug("Exception during opening of websocket: %s", e)
|
275
277
|
if self.listener:
|
@@ -444,6 +446,7 @@ class Connection(metaclass=CantTouchThis):
|
|
444
446
|
if not _is_update:
|
445
447
|
await self._register_handlers()
|
446
448
|
await self.websocket.send(tx.message)
|
449
|
+
sb_config._cdp_aclose = self.aclose
|
447
450
|
try:
|
448
451
|
return await tx
|
449
452
|
except ProtocolException as e:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.37.
|
3
|
+
Version: 4.37.11
|
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
|
@@ -63,7 +63,7 @@ Requires-Dist: pip>=25.0.1; python_version < "3.9"
|
|
63
63
|
Requires-Dist: pip>=25.1; python_version >= "3.9"
|
64
64
|
Requires-Dist: packaging>=25.0
|
65
65
|
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
66
|
-
Requires-Dist: setuptools>=80.
|
66
|
+
Requires-Dist: setuptools>=80.1.0; python_version >= "3.10"
|
67
67
|
Requires-Dist: wheel>=0.45.1
|
68
68
|
Requires-Dist: attrs>=25.3.0
|
69
69
|
Requires-Dist: certifi>=2025.4.26
|
@@ -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=68dBi7f0_B2lyuPHxiy82BP-okAoU_wferII9Ac7yPA,47
|
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=pCpdDHNZc9oYZUviGSP8Dr_TiNXUDBN5ridKq1N7tAw,240292
|
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
|
@@ -65,7 +65,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
|
|
65
65
|
seleniumbase/extensions/recorder.zip,sha256=OOyzF-Ize2cSRu1CqhzSAq5vusI9hqLLd2OIApUHesI,11918
|
66
66
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
67
67
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
68
|
+
seleniumbase/fixtures/base_case.py,sha256=wUgv1e1Y7EJKTJgWr0JrMt_V4dvuAXjpllkQa1-ryp4,726416
|
69
69
|
seleniumbase/fixtures/constants.py,sha256=WMrItuNyKq3XVJ64NluLIRc4gJCxDw8K8qXED0b9S2w,13752
|
70
70
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
71
71
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
@@ -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=83GL6s71wBvs--0kwy9vlI2FvD7XZmvdUs3AKHY80X8,58370
|
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
|
@@ -106,7 +106,7 @@ seleniumbase/translate/portuguese.py,sha256=x3P4qxp56UiI41GoaL7JbUvFRYsgXU1EKjTg
|
|
106
106
|
seleniumbase/translate/russian.py,sha256=TyN9n0b4GRWDEYnHRGw1rfNAscdDmP3F3Y3aySM3C7s,27978
|
107
107
|
seleniumbase/translate/spanish.py,sha256=hh3xgW1Pq122SHYVvJAxFaXhFrjniOVncVbJbfWqOUM,25528
|
108
108
|
seleniumbase/translate/translator.py,sha256=wPhZH6e5NhmebYL1kP2eGxUcVy1gfTb6XCH8ATEPpxE,49238
|
109
|
-
seleniumbase/undetected/__init__.py,sha256=
|
109
|
+
seleniumbase/undetected/__init__.py,sha256=ac9-Djc0aypojaisg8bpkga03igfkNW4VmyRAEJdNas,26902
|
110
110
|
seleniumbase/undetected/cdp.py,sha256=G6nLStm1l8PmZlKIyMnFcYMV7HD5kiGb-9BaqPjVP3I,5497
|
111
111
|
seleniumbase/undetected/dprocess.py,sha256=83EV8ZHJWHG1TSUv9JNClBhdgiBXlkCc6mJ--HsoP3k,1681
|
112
112
|
seleniumbase/undetected/options.py,sha256=BoNuwhrG7oOvuLvTwkvsWCF36pMkS1tHCG-XpP4_EkI,3001
|
@@ -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=jccGcDt-TqgknvMNQYpRbhrSMC_74tYs-9YH1NK5UGU,24572
|
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.37.
|
139
|
-
seleniumbase-4.37.
|
140
|
-
seleniumbase-4.37.
|
141
|
-
seleniumbase-4.37.
|
142
|
-
seleniumbase-4.37.
|
143
|
-
seleniumbase-4.37.
|
138
|
+
seleniumbase-4.37.11.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.37.11.dist-info/METADATA,sha256=UAuO4tQuv-_XAyRoU8wW43LW8DavNq4I0gZ_DR33_IA,86954
|
140
|
+
seleniumbase-4.37.11.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
141
|
+
seleniumbase-4.37.11.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.37.11.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.37.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|