seleniumbase 4.37.10__py3-none-any.whl → 4.37.12__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 -0
- seleniumbase/fixtures/base_case.py +12 -0
- seleniumbase/plugins/sb_manager.py +5 -1
- seleniumbase/undetected/__init__.py +1 -3
- seleniumbase/undetected/cdp_driver/connection.py +7 -3
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.12.dist-info}/METADATA +2 -2
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.12.dist-info}/RECORD +12 -12
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.12.dist-info}/WHEEL +1 -1
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.12.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.12.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.37.10.dist-info → seleniumbase-4.37.12.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.12"
|
@@ -543,6 +543,23 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
|
|
543
543
|
if url_protocol not in ["about", "data", "chrome"]:
|
544
544
|
safe_url = False
|
545
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
|
+
|
546
563
|
headless = False
|
547
564
|
headed = None
|
548
565
|
xvfb = None
|
@@ -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)
|
@@ -1372,7 +1372,11 @@ def SB(
|
|
1372
1372
|
if undetectable and hasattr(sb, "_drivers_browser_map"):
|
1373
1373
|
import asyncio
|
1374
1374
|
for driver in sb._drivers_browser_map.keys():
|
1375
|
-
if
|
1375
|
+
if (
|
1376
|
+
hasattr(driver, "cdp")
|
1377
|
+
and driver.cdp
|
1378
|
+
and hasattr(driver.cdp, "loop")
|
1379
|
+
):
|
1376
1380
|
asyncio.set_event_loop(driver.cdp.loop)
|
1377
1381
|
tasks = [tab.aclose() for tab in driver.cdp.get_tabs()]
|
1378
1382
|
tasks.append(driver.cdp.driver.connection.aclose())
|
@@ -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)
|
@@ -273,7 +273,7 @@ class Connection(metaclass=CantTouchThis):
|
|
273
273
|
except (Exception,) as e:
|
274
274
|
logger.debug("Exception during opening of websocket: %s", e)
|
275
275
|
if self.listener:
|
276
|
-
self.listener.cancel()
|
276
|
+
await self.listener.cancel()
|
277
277
|
raise
|
278
278
|
if not self.listener or not self.listener.running:
|
279
279
|
self.listener = Listener(self)
|
@@ -298,7 +298,7 @@ class Connection(metaclass=CantTouchThis):
|
|
298
298
|
self.websocket_url
|
299
299
|
)
|
300
300
|
if self.listener and self.listener.running:
|
301
|
-
self.listener.cancel()
|
301
|
+
await self.listener.cancel()
|
302
302
|
self.enabled_domains.clear()
|
303
303
|
logger.debug(
|
304
304
|
"\n❌ Closed websocket connection to %s", self.websocket_url
|
@@ -554,9 +554,13 @@ class Listener:
|
|
554
554
|
def time_before_considered_idle(self, seconds: Union[int, float]):
|
555
555
|
self._time_before_considered_idle = seconds
|
556
556
|
|
557
|
-
def cancel(self):
|
557
|
+
async def cancel(self):
|
558
558
|
if self.task and not self.task.cancelled():
|
559
559
|
self.task.cancel()
|
560
|
+
try:
|
561
|
+
await self.task
|
562
|
+
except asyncio.CancelledError:
|
563
|
+
pass
|
560
564
|
|
561
565
|
@property
|
562
566
|
def running(self):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.37.
|
3
|
+
Version: 4.37.12
|
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=rwlj0pH2DziZFybehnQMFMUMvaFBjH_oaKmjDIH-bcY,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=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
|
@@ -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=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
|
@@ -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=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.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.12.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.37.12.dist-info/METADATA,sha256=EhCdnLOEe67nJdV9n9cUeXya7KEyRvwnYuR9hR9Tzcg,86954
|
140
|
+
seleniumbase-4.37.12.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
141
|
+
seleniumbase-4.37.12.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.37.12.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.37.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|