seleniumbase 4.33.0__py3-none-any.whl → 4.33.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/browser_launcher.py +19 -6
- seleniumbase/core/sb_cdp.py +8 -0
- seleniumbase/undetected/cdp_driver/browser.py +7 -10
- {seleniumbase-4.33.0.dist-info → seleniumbase-4.33.1.dist-info}/METADATA +2 -2
- {seleniumbase-4.33.0.dist-info → seleniumbase-4.33.1.dist-info}/RECORD +10 -10
- {seleniumbase-4.33.0.dist-info → seleniumbase-4.33.1.dist-info}/LICENSE +0 -0
- {seleniumbase-4.33.0.dist-info → seleniumbase-4.33.1.dist-info}/WHEEL +0 -0
- {seleniumbase-4.33.0.dist-info → seleniumbase-4.33.1.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.33.0.dist-info → seleniumbase-4.33.1.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.33.
|
2
|
+
__version__ = "4.33.1"
|
@@ -612,6 +612,7 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
612
612
|
cdp.save_cookies = CDPM.save_cookies
|
613
613
|
cdp.load_cookies = CDPM.load_cookies
|
614
614
|
cdp.clear_cookies = CDPM.clear_cookies
|
615
|
+
cdp.sleep = CDPM.sleep
|
615
616
|
cdp.bring_active_window_to_front = CDPM.bring_active_window_to_front
|
616
617
|
cdp.bring_to_front = CDPM.bring_active_window_to_front
|
617
618
|
cdp.get_active_element = CDPM.get_active_element
|
@@ -684,6 +685,7 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
684
685
|
cdp.select_if_unselected = CDPM.select_if_unselected
|
685
686
|
cdp.unselect_if_selected = CDPM.unselect_if_selected
|
686
687
|
cdp.is_checked = CDPM.is_checked
|
688
|
+
cdp.is_selected = CDPM.is_selected
|
687
689
|
cdp.is_element_present = CDPM.is_element_present
|
688
690
|
cdp.is_element_visible = CDPM.is_element_visible
|
689
691
|
cdp.wait_for_element_visible = CDPM.wait_for_element_visible
|
@@ -699,6 +701,8 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
699
701
|
cdp.assert_url_contains = CDPM.assert_url_contains
|
700
702
|
cdp.assert_text = CDPM.assert_text
|
701
703
|
cdp.assert_exact_text = CDPM.assert_exact_text
|
704
|
+
cdp.assert_true = CDPM.assert_true
|
705
|
+
cdp.assert_false = CDPM.assert_false
|
702
706
|
cdp.scroll_into_view = CDPM.scroll_into_view
|
703
707
|
cdp.scroll_to_y = CDPM.scroll_to_y
|
704
708
|
cdp.scroll_to_top = CDPM.scroll_to_top
|
@@ -1167,7 +1171,12 @@ def _uc_gui_click_captcha(
|
|
1167
1171
|
frame = "%s div" % frame
|
1168
1172
|
elif (
|
1169
1173
|
driver.is_element_present('[name*="cf-turnstile-"]')
|
1170
|
-
and driver.is_element_present(
|
1174
|
+
and driver.is_element_present("#challenge-form div > div")
|
1175
|
+
):
|
1176
|
+
frame = "#challenge-form div > div"
|
1177
|
+
elif (
|
1178
|
+
driver.is_element_present('[name*="cf-turnstile-"]')
|
1179
|
+
and driver.is_element_present("[class*=spacer] + div div")
|
1171
1180
|
):
|
1172
1181
|
frame = '[class*=spacer] + div div'
|
1173
1182
|
elif (
|
@@ -1240,8 +1249,8 @@ def _uc_gui_click_captcha(
|
|
1240
1249
|
return
|
1241
1250
|
try:
|
1242
1251
|
if ctype == "g_rc" and not driver.is_connected():
|
1243
|
-
x = (i_x +
|
1244
|
-
y = (i_y +
|
1252
|
+
x = (i_x + 29) * width_ratio
|
1253
|
+
y = (i_y + 35) * width_ratio
|
1245
1254
|
elif visible_iframe:
|
1246
1255
|
selector = "span"
|
1247
1256
|
if ctype == "g_rc":
|
@@ -1256,8 +1265,8 @@ def _uc_gui_click_captcha(
|
|
1256
1265
|
y = i_y + element.rect["y"] + (element.rect["height"] / 2.0)
|
1257
1266
|
y += 0.5
|
1258
1267
|
else:
|
1259
|
-
x = (i_x +
|
1260
|
-
y = (i_y +
|
1268
|
+
x = (i_x + 32) * width_ratio
|
1269
|
+
y = (i_y + 32) * width_ratio
|
1261
1270
|
if driver.is_connected():
|
1262
1271
|
driver.switch_to.default_content()
|
1263
1272
|
except Exception:
|
@@ -1497,6 +1506,7 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
|
|
1497
1506
|
tab_count += 1
|
1498
1507
|
time.sleep(0.027)
|
1499
1508
|
active_element_css = js_utils.get_active_element_css(driver)
|
1509
|
+
print(active_element_css)
|
1500
1510
|
if (
|
1501
1511
|
active_element_css.startswith(selector)
|
1502
1512
|
or active_element_css.endswith(" > div" * 2)
|
@@ -1514,7 +1524,10 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
|
|
1514
1524
|
except Exception:
|
1515
1525
|
return
|
1516
1526
|
if (
|
1517
|
-
|
1527
|
+
(
|
1528
|
+
driver.is_element_present(".footer .clearfix .ray-id")
|
1529
|
+
or driver.is_element_present("script[data-cf-beacon]")
|
1530
|
+
)
|
1518
1531
|
and hasattr(sb_config, "_saved_cf_tab_count")
|
1519
1532
|
and sb_config._saved_cf_tab_count
|
1520
1533
|
):
|
seleniumbase/core/sb_cdp.py
CHANGED
@@ -1681,6 +1681,14 @@ class CDPMethods():
|
|
1681
1681
|
% (text, element.text_all, selector)
|
1682
1682
|
)
|
1683
1683
|
|
1684
|
+
def assert_true(self, expression):
|
1685
|
+
if not expression:
|
1686
|
+
raise AssertionError("%s is not true")
|
1687
|
+
|
1688
|
+
def assert_false(self, expression):
|
1689
|
+
if expression:
|
1690
|
+
raise AssertionError("%s is not false")
|
1691
|
+
|
1684
1692
|
def scroll_into_view(self, selector):
|
1685
1693
|
self.find_element(selector).scroll_into_view()
|
1686
1694
|
self.loop.run_until_complete(self.page.wait())
|
@@ -6,8 +6,9 @@ import http.cookiejar
|
|
6
6
|
import json
|
7
7
|
import logging
|
8
8
|
import os
|
9
|
-
import pickle
|
10
9
|
import pathlib
|
10
|
+
import pickle
|
11
|
+
import re
|
11
12
|
import shutil
|
12
13
|
import urllib.parse
|
13
14
|
import urllib.request
|
@@ -644,7 +645,7 @@ class CookieJar:
|
|
644
645
|
"""
|
645
646
|
connection = None
|
646
647
|
for _tab in self._browser.tabs:
|
647
|
-
if _tab.closed:
|
648
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
648
649
|
continue
|
649
650
|
connection = _tab
|
650
651
|
break
|
@@ -674,7 +675,7 @@ class CookieJar:
|
|
674
675
|
"""
|
675
676
|
connection = None
|
676
677
|
for _tab in self._browser.tabs:
|
677
|
-
if _tab.closed:
|
678
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
678
679
|
continue
|
679
680
|
connection = _tab
|
680
681
|
break
|
@@ -698,13 +699,11 @@ class CookieJar:
|
|
698
699
|
- Contain "nowsecure"
|
699
700
|
:type pattern: str
|
700
701
|
"""
|
701
|
-
import re
|
702
|
-
|
703
702
|
pattern = re.compile(pattern)
|
704
703
|
save_path = pathlib.Path(file).resolve()
|
705
704
|
connection = None
|
706
705
|
for _tab in self._browser.tabs:
|
707
|
-
if _tab.closed:
|
706
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
708
707
|
continue
|
709
708
|
connection = _tab
|
710
709
|
break
|
@@ -746,15 +745,13 @@ class CookieJar:
|
|
746
745
|
- Contain "nowsecure"
|
747
746
|
:type pattern: str
|
748
747
|
"""
|
749
|
-
import re
|
750
|
-
|
751
748
|
pattern = re.compile(pattern)
|
752
749
|
save_path = pathlib.Path(file).resolve()
|
753
750
|
cookies = pickle.load(save_path.open("r+b"))
|
754
751
|
included_cookies = []
|
755
752
|
connection = None
|
756
753
|
for _tab in self._browser.tabs:
|
757
|
-
if _tab.closed:
|
754
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
758
755
|
continue
|
759
756
|
connection = _tab
|
760
757
|
break
|
@@ -779,7 +776,7 @@ class CookieJar:
|
|
779
776
|
"""
|
780
777
|
connection = None
|
781
778
|
for _tab in self._browser.tabs:
|
782
|
-
if _tab.closed:
|
779
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
783
780
|
continue
|
784
781
|
connection = _tab
|
785
782
|
break
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.33.
|
3
|
+
Version: 4.33.1
|
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
|
@@ -146,7 +146,7 @@ Requires-Dist: mss==9.0.2; extra == "mss"
|
|
146
146
|
Provides-Extra: pdfminer
|
147
147
|
Requires-Dist: pdfminer.six==20240706; extra == "pdfminer"
|
148
148
|
Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
|
149
|
-
Requires-Dist: cryptography==
|
149
|
+
Requires-Dist: cryptography==44.0.0; python_version >= "3.9" and extra == "pdfminer"
|
150
150
|
Requires-Dist: cffi==1.17.1; extra == "pdfminer"
|
151
151
|
Requires-Dist: pycparser==2.22; extra == "pdfminer"
|
152
152
|
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=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=WinMHufazbTH89-Ykuh9u7jq8VeYFiM_Km5byqgexBc,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=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=TbUR5NkE4r34SFe5t_2R2uV8Br6NG8fihZOAZ2uZy3s,220834
|
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=tS1eVtNEaNy12lqWNREFptRm_ylOxqQIwICvGwojwuk,67182
|
54
54
|
seleniumbase/core/sb_driver.py,sha256=NGa4adi8OAi2WFtFkEguXg3JCd1p-JuZweIpGNifEfU,13488
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=KokVXpCiGZhJ-D4Bo-hizPz5r-iefzWoiTANu9zNaq4,7504
|
@@ -115,7 +115,7 @@ seleniumbase/undetected/reactor.py,sha256=NropaXcO54pzmDq6quR27qPJxab6636H7LRAaq
|
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=_s6evgUkdWJpwOnzX4qR9i796PoVbz3txlzHlOBJ4BE,1370
|
116
116
|
seleniumbase/undetected/cdp_driver/__init__.py,sha256=c0TjMwPfVFyoqYOJ7PQ-Jln_L_dpN3ebHyaD-juQoM0,64
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=6thDYeoEGiC7Q3tXLgoD_AhxecCFnATzBSjNympyRHA,3184
|
118
|
-
seleniumbase/undetected/cdp_driver/browser.py,sha256=
|
118
|
+
seleniumbase/undetected/cdp_driver/browser.py,sha256=n8GYspU7b0pfBT4AqhqY6IdGVOZ1FC4wJ5emIOl-khQ,30129
|
119
119
|
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=YhtD2Tm6PLIy9VKbgk8lHdGniS3mObyX4yAC1aG0TgQ,16733
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=Rjvde7V-XJ0ihZdTmOmHEVWSuDWm3SprQ3njg8SN3Go,12087
|
121
121
|
seleniumbase/undetected/cdp_driver/connection.py,sha256=sOTUGjbUqKA2hPvDcRCdqw1VQjVGJs7mbgVvzS7ldtE,23360
|
@@ -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.33.
|
139
|
-
seleniumbase-4.33.
|
140
|
-
seleniumbase-4.33.
|
141
|
-
seleniumbase-4.33.
|
142
|
-
seleniumbase-4.33.
|
143
|
-
seleniumbase-4.33.
|
138
|
+
seleniumbase-4.33.1.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
139
|
+
seleniumbase-4.33.1.dist-info/METADATA,sha256=Enu7xujlzc9XwoPVPstRzT_tCtGllzWM6NxKTLIkLbM,86554
|
140
|
+
seleniumbase-4.33.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
141
|
+
seleniumbase-4.33.1.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.33.1.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.33.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|