seleniumbase 4.37.0__py3-none-any.whl → 4.37.2__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 +1 -0
- seleniumbase/core/sb_cdp.py +23 -7
- seleniumbase/fixtures/base_case.py +7 -0
- seleniumbase/undetected/__init__.py +35 -5
- seleniumbase/undetected/cdp_driver/cdp_util.py +7 -1
- {seleniumbase-4.37.0.dist-info → seleniumbase-4.37.2.dist-info}/METADATA +3 -3
- {seleniumbase-4.37.0.dist-info → seleniumbase-4.37.2.dist-info}/RECORD +12 -12
- {seleniumbase-4.37.0.dist-info → seleniumbase-4.37.2.dist-info}/WHEEL +0 -0
- {seleniumbase-4.37.0.dist-info → seleniumbase-4.37.2.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.37.0.dist-info → seleniumbase-4.37.2.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.37.0.dist-info → seleniumbase-4.37.2.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.2"
|
@@ -682,6 +682,7 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
682
682
|
cdp.gui_click_element = CDPM.gui_click_element
|
683
683
|
cdp.gui_drag_drop_points = CDPM.gui_drag_drop_points
|
684
684
|
cdp.gui_drag_and_drop = CDPM.gui_drag_and_drop
|
685
|
+
cdp.gui_click_and_hold = CDPM.gui_click_and_hold
|
685
686
|
cdp.gui_hover_x_y = CDPM.gui_hover_x_y
|
686
687
|
cdp.gui_hover_element = CDPM.gui_hover_element
|
687
688
|
cdp.gui_hover_and_click = CDPM.gui_hover_and_click
|
seleniumbase/core/sb_cdp.py
CHANGED
@@ -1227,15 +1227,23 @@ class CDPMethods():
|
|
1227
1227
|
if not timeout:
|
1228
1228
|
timeout = settings.SMALL_TIMEOUT
|
1229
1229
|
selector = self.__convert_to_css_if_xpath(selector)
|
1230
|
-
self.select(selector, timeout=timeout)
|
1230
|
+
element = self.select(selector, timeout=timeout)
|
1231
1231
|
self.__add_light_pause()
|
1232
|
-
coordinates =
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1232
|
+
coordinates = None
|
1233
|
+
if ":contains(" in selector:
|
1234
|
+
position = element.get_position()
|
1235
|
+
x = position.x
|
1236
|
+
y = position.y
|
1237
|
+
width = position.width
|
1238
|
+
height = position.height
|
1239
|
+
coordinates = {"x": x, "y": y, "width": width, "height": height}
|
1240
|
+
else:
|
1241
|
+
coordinates = self.loop.run_until_complete(
|
1242
|
+
self.page.js_dumps(
|
1243
|
+
"""document.querySelector('%s').getBoundingClientRect()"""
|
1244
|
+
% js_utils.escape_quotes_if_needed(re.escape(selector))
|
1245
|
+
)
|
1237
1246
|
)
|
1238
|
-
)
|
1239
1247
|
return coordinates
|
1240
1248
|
|
1241
1249
|
def get_element_size(self, selector, timeout=None):
|
@@ -1665,6 +1673,14 @@ class CDPMethods():
|
|
1665
1673
|
self.__add_light_pause()
|
1666
1674
|
self.gui_drag_drop_points(x1, y1, x2, y2, timeframe=timeframe)
|
1667
1675
|
|
1676
|
+
def gui_click_and_hold(self, selector, timeframe=0.35):
|
1677
|
+
"""Use PyAutoGUI to click-and-hold a selector."""
|
1678
|
+
self.__slow_mode_pause_if_set()
|
1679
|
+
self.bring_active_window_to_front()
|
1680
|
+
x, y = self.get_gui_element_center(selector)
|
1681
|
+
self.__add_light_pause()
|
1682
|
+
self.gui_drag_drop_points(x, y, x, y, timeframe=timeframe)
|
1683
|
+
|
1668
1684
|
def __gui_hover_x_y(self, x, y, timeframe=0.25, uc_lock=False):
|
1669
1685
|
self.__install_pyautogui_if_missing()
|
1670
1686
|
import pyautogui
|
@@ -4871,6 +4871,13 @@ class BaseCase(unittest.TestCase):
|
|
4871
4871
|
|
4872
4872
|
def activate_cdp_mode(self, url=None):
|
4873
4873
|
if hasattr(self.driver, "_is_using_uc") and self.driver._is_using_uc:
|
4874
|
+
if self.__is_cdp_swap_needed():
|
4875
|
+
return # CDP Mode is already active
|
4876
|
+
if not self.is_connected():
|
4877
|
+
self.driver.connect()
|
4878
|
+
current_url = self.get_current_url()
|
4879
|
+
if not current_url.startswith(("about", "data", "chrome")):
|
4880
|
+
self.get_new_driver(undetectable=True)
|
4874
4881
|
self.driver.uc_open_with_cdp_mode(url)
|
4875
4882
|
else:
|
4876
4883
|
self.get_new_driver(undetectable=True)
|
@@ -441,7 +441,13 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
441
441
|
with suppress(Exception):
|
442
442
|
if self.service.is_connectable():
|
443
443
|
self.stop_client()
|
444
|
-
|
444
|
+
try:
|
445
|
+
self.service.send_remote_shutdown_command()
|
446
|
+
except TypeError:
|
447
|
+
pass
|
448
|
+
finally:
|
449
|
+
with suppress(Exception):
|
450
|
+
self.service._terminate_process()
|
445
451
|
if isinstance(timeout, str):
|
446
452
|
if timeout.lower() == "breakpoint":
|
447
453
|
breakpoint() # To continue:
|
@@ -466,7 +472,13 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
466
472
|
self.close()
|
467
473
|
if self.service.is_connectable():
|
468
474
|
self.stop_client()
|
469
|
-
|
475
|
+
try:
|
476
|
+
self.service.send_remote_shutdown_command()
|
477
|
+
except TypeError:
|
478
|
+
pass
|
479
|
+
finally:
|
480
|
+
with suppress(Exception):
|
481
|
+
self.service._terminate_process()
|
470
482
|
self.service.start()
|
471
483
|
self.start_session()
|
472
484
|
time.sleep(0.003)
|
@@ -482,7 +494,13 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
482
494
|
if self.service.is_connectable():
|
483
495
|
self.stop_client()
|
484
496
|
time.sleep(0.003)
|
485
|
-
|
497
|
+
try:
|
498
|
+
self.service.send_remote_shutdown_command()
|
499
|
+
except TypeError:
|
500
|
+
pass
|
501
|
+
finally:
|
502
|
+
with suppress(Exception):
|
503
|
+
self.service._terminate_process()
|
486
504
|
self._is_connected = False
|
487
505
|
|
488
506
|
def connect(self):
|
@@ -507,7 +525,13 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
507
525
|
self.close()
|
508
526
|
if self.service.is_connectable():
|
509
527
|
self.stop_client()
|
510
|
-
|
528
|
+
try:
|
529
|
+
self.service.send_remote_shutdown_command()
|
530
|
+
except TypeError:
|
531
|
+
pass
|
532
|
+
finally:
|
533
|
+
with suppress(Exception):
|
534
|
+
self.service._terminate_process()
|
511
535
|
self.service.start()
|
512
536
|
self.start_session()
|
513
537
|
time.sleep(0.003)
|
@@ -539,7 +563,13 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
539
563
|
logger.debug("Stopping webdriver service")
|
540
564
|
with suppress(Exception):
|
541
565
|
self.stop_client()
|
542
|
-
|
566
|
+
try:
|
567
|
+
self.service.send_remote_shutdown_command()
|
568
|
+
except TypeError:
|
569
|
+
pass
|
570
|
+
finally:
|
571
|
+
with suppress(Exception):
|
572
|
+
self.service._terminate_process()
|
543
573
|
with suppress(Exception):
|
544
574
|
if self.reactor and isinstance(self.reactor, Reactor):
|
545
575
|
logger.debug("Shutting down Reactor")
|
@@ -406,7 +406,13 @@ async def create_from_driver(driver) -> Browser:
|
|
406
406
|
browser = await start(conf)
|
407
407
|
browser._process_pid = driver.browser_pid
|
408
408
|
# Stop chromedriver binary
|
409
|
-
|
409
|
+
try:
|
410
|
+
driver.service.send_remote_shutdown_command()
|
411
|
+
except TypeError:
|
412
|
+
pass
|
413
|
+
finally:
|
414
|
+
with suppress(Exception):
|
415
|
+
driver.service._terminate_process()
|
410
416
|
driver.browser_pid = -1
|
411
417
|
driver.user_data_dir = None
|
412
418
|
return browser
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.37.
|
3
|
+
Version: 4.37.2
|
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
|
@@ -76,7 +76,7 @@ Requires-Dist: mycdp>=1.1.1
|
|
76
76
|
Requires-Dist: pynose>=1.5.4
|
77
77
|
Requires-Dist: platformdirs>=4.3.6; python_version < "3.9"
|
78
78
|
Requires-Dist: platformdirs>=4.3.7; python_version >= "3.9"
|
79
|
-
Requires-Dist: typing-extensions>=4.13.
|
79
|
+
Requires-Dist: typing-extensions>=4.13.2
|
80
80
|
Requires-Dist: sbvirtualdisplay>=1.4.0
|
81
81
|
Requires-Dist: MarkupSafe==2.1.5; python_version < "3.9"
|
82
82
|
Requires-Dist: MarkupSafe>=3.0.2; python_version >= "3.9"
|
@@ -94,7 +94,7 @@ Requires-Dist: idna==3.10
|
|
94
94
|
Requires-Dist: chardet==5.2.0
|
95
95
|
Requires-Dist: charset-normalizer==3.4.1
|
96
96
|
Requires-Dist: urllib3<2,>=1.26.20; python_version < "3.10"
|
97
|
-
Requires-Dist: urllib3<2.
|
97
|
+
Requires-Dist: urllib3<2.5.0,>=1.26.20; python_version >= "3.10"
|
98
98
|
Requires-Dist: requests==2.32.3
|
99
99
|
Requires-Dist: sniffio==1.3.1
|
100
100
|
Requires-Dist: h11==0.14.0
|
@@ -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=Vmyu1nrXKb5h1xNjtD4ZvuGS53Y5AVtMxP5LqAt56mM,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=H8CVjbO6M43op-sCNakek8NYBdZnc3FC1ekGtj-I6oI,239787
|
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=4VkpMwavz0fx8wcOqJ_jyBT0HIXwcxmAcpd1gjJ
|
|
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=z_4qx2jI_gtK5r3niGXgEOBpfMUicUCOciowai50MP4,3529
|
53
|
-
seleniumbase/core/sb_cdp.py,sha256=
|
53
|
+
seleniumbase/core/sb_cdp.py,sha256=L7b7kquCIh-pI7vjAi2pE9Z8WAMoTSP99M3zVKKYVSE,86412
|
54
54
|
seleniumbase/core/sb_driver.py,sha256=yvTDRblBzG6bDX7XcLiAA6QcBelSJj_HHL_04lcfeeE,13760
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=gqVohHVlE_5L5Cqe2L24uYrRzvoK-saX8E_Df7_-_3I,7609
|
@@ -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=tv65GtPheFm9T2B2VtGP8ooDRejOtyAizcICYw7I_GY,725685
|
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
|
@@ -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=xvbUlPJEF7nAkdy9bxca5W-ltX6cI38lMyJGwVetPPM,26230
|
110
110
|
seleniumbase/undetected/cdp.py,sha256=RLpwZnhUvmK9tgXcZIBBQedwk2q7Jj_EXZkmzI8WUqk,4023
|
111
111
|
seleniumbase/undetected/dprocess.py,sha256=83EV8ZHJWHG1TSUv9JNClBhdgiBXlkCc6mJ--HsoP3k,1681
|
112
112
|
seleniumbase/undetected/options.py,sha256=BoNuwhrG7oOvuLvTwkvsWCF36pMkS1tHCG-XpP4_EkI,3001
|
@@ -116,7 +116,7 @@ seleniumbase/undetected/webelement.py,sha256=OOpUYbEiOG52KsYYyuDW9tYLdA2SMnukvwQ
|
|
116
116
|
seleniumbase/undetected/cdp_driver/__init__.py,sha256=Ga9alwuaZZy4_XOShc0HjgFnNqpPdrcbjAicz5gE7a4,215
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
|
118
118
|
seleniumbase/undetected/cdp_driver/browser.py,sha256=c-9EWqpD2ZtpDg8edMuw9hYa6GuyOP1qxorNjtsWe1U,30457
|
119
|
-
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=
|
119
|
+
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=oKUEHx220PEFvHLW4dz18i4j1Q6HPTdkKx9QOKAVZ3I,21821
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=t8KV1Vqa5SQRBq3-gjkHHmj9h85AplAM01asO3AWufs,12507
|
121
121
|
seleniumbase/undetected/cdp_driver/connection.py,sha256=_ounWzQ1m3_t-zJVgOAU2RINiKphfJkw2Qbu-zIoHC0,23359
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
|
@@ -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.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.37.2.dist-info/METADATA,sha256=EccEGDheFz8nOIVDlmy7PSFeMeU6F6Uk6L-PJksB9dE,86879
|
140
|
+
seleniumbase-4.37.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
141
|
+
seleniumbase-4.37.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.37.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.37.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|