seleniumbase 4.35.4__py3-none-any.whl → 4.35.6__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 +37 -2
- seleniumbase/fixtures/base_case.py +24 -5
- seleniumbase/plugins/driver_manager.py +17 -0
- seleniumbase/plugins/sb_manager.py +17 -0
- {seleniumbase-4.35.4.dist-info → seleniumbase-4.35.6.dist-info}/METADATA +3 -3
- {seleniumbase-4.35.4.dist-info → seleniumbase-4.35.6.dist-info}/RECORD +11 -11
- {seleniumbase-4.35.4.dist-info → seleniumbase-4.35.6.dist-info}/LICENSE +0 -0
- {seleniumbase-4.35.4.dist-info → seleniumbase-4.35.6.dist-info}/WHEEL +0 -0
- {seleniumbase-4.35.4.dist-info → seleniumbase-4.35.6.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.35.4.dist-info → seleniumbase-4.35.6.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.35.
|
2
|
+
__version__ = "4.35.6"
|
@@ -1288,6 +1288,13 @@ def _uc_gui_click_captcha(
|
|
1288
1288
|
and driver.is_element_present("form div:not(:has(*))")
|
1289
1289
|
):
|
1290
1290
|
frame = "form div:not(:has(*))"
|
1291
|
+
elif (
|
1292
|
+
driver.is_element_present('[src*="/turnstile/"]')
|
1293
|
+
and driver.is_element_present(
|
1294
|
+
"body > div#check > div:not([class])"
|
1295
|
+
)
|
1296
|
+
):
|
1297
|
+
frame = "body > div#check > div:not([class])"
|
1291
1298
|
elif driver.is_element_present(".cf-turnstile-wrapper"):
|
1292
1299
|
frame = ".cf-turnstile-wrapper"
|
1293
1300
|
elif driver.is_element_present(
|
@@ -1319,15 +1326,36 @@ def _uc_gui_click_captcha(
|
|
1319
1326
|
driver.cdp.evaluate(script)
|
1320
1327
|
else:
|
1321
1328
|
driver.execute_script(script)
|
1329
|
+
elif (
|
1330
|
+
driver.is_element_present("form")
|
1331
|
+
and (
|
1332
|
+
driver.is_element_present('form div[style*="center"]')
|
1333
|
+
or driver.is_element_present('form div[style*="right"]')
|
1334
|
+
)
|
1335
|
+
):
|
1336
|
+
script = (
|
1337
|
+
"""var $elements = document.querySelectorAll(
|
1338
|
+
'form[style], form div[style]');
|
1339
|
+
var index = 0, length = $elements.length;
|
1340
|
+
for(; index < length; index++){
|
1341
|
+
the_style = $elements[index].getAttribute('style');
|
1342
|
+
new_style = the_style.replaceAll('center', 'left');
|
1343
|
+
new_style = new_style.replaceAll('right', 'left');
|
1344
|
+
$elements[index].setAttribute('style', new_style);}"""
|
1345
|
+
)
|
1346
|
+
if __is_cdp_swap_needed(driver):
|
1347
|
+
driver.cdp.evaluate(script)
|
1348
|
+
else:
|
1349
|
+
driver.execute_script(script)
|
1322
1350
|
elif (
|
1323
1351
|
driver.is_element_present("form")
|
1324
1352
|
and driver.is_element_present(
|
1325
|
-
|
1353
|
+
'form [id*="turnstile"] > div:not([class])'
|
1326
1354
|
)
|
1327
1355
|
):
|
1328
1356
|
script = (
|
1329
1357
|
"""var $elements = document.querySelectorAll(
|
1330
|
-
'form
|
1358
|
+
'form [id*="turnstile"]');
|
1331
1359
|
var index = 0, length = $elements.length;
|
1332
1360
|
for(; index < length; index++){
|
1333
1361
|
$elements[index].setAttribute('align', 'left');}"""
|
@@ -1577,6 +1605,13 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
|
|
1577
1605
|
):
|
1578
1606
|
frame = "form div:not(:has(*))"
|
1579
1607
|
tab_up_first = True
|
1608
|
+
elif (
|
1609
|
+
driver.is_element_present('[src*="/turnstile/"]')
|
1610
|
+
and driver.is_element_present(
|
1611
|
+
"body > div#check > div:not([class])"
|
1612
|
+
)
|
1613
|
+
):
|
1614
|
+
frame = "body > div#check > div:not([class])"
|
1580
1615
|
else:
|
1581
1616
|
return
|
1582
1617
|
else:
|
@@ -8070,10 +8070,6 @@ class BaseCase(unittest.TestCase):
|
|
8070
8070
|
else:
|
8071
8071
|
found = False
|
8072
8072
|
message = entry["message"]
|
8073
|
-
if message.count(" - Failed to load resource") == 1:
|
8074
|
-
message = message.split(
|
8075
|
-
" - Failed to load resource"
|
8076
|
-
)[0]
|
8077
8073
|
for substring in exclude:
|
8078
8074
|
substring = str(substring)
|
8079
8075
|
if (
|
@@ -8091,7 +8087,30 @@ class BaseCase(unittest.TestCase):
|
|
8091
8087
|
u_c_t_e = " Uncaught TypeError: "
|
8092
8088
|
if f_t_l_r in errors[n]["message"]:
|
8093
8089
|
url = errors[n]["message"].split(f_t_l_r)[0]
|
8094
|
-
|
8090
|
+
if "status of 400" in errors[n]["message"]:
|
8091
|
+
errors[n] = {"Error 400 (Bad Request)": url}
|
8092
|
+
elif "status of 401" in errors[n]["message"]:
|
8093
|
+
errors[n] = {"Error 401 (Unauthorized)": url}
|
8094
|
+
elif "status of 402" in errors[n]["message"]:
|
8095
|
+
errors[n] = {"Error 402 (Payment Required)": url}
|
8096
|
+
elif "status of 403" in errors[n]["message"]:
|
8097
|
+
errors[n] = {"Error 403 (Forbidden)": url}
|
8098
|
+
elif "status of 404" in errors[n]["message"]:
|
8099
|
+
errors[n] = {"Error 404 (Not Found)": url}
|
8100
|
+
elif "status of 405" in errors[n]["message"]:
|
8101
|
+
errors[n] = {"Error 405 (Method Not Allowed)": url}
|
8102
|
+
elif "status of 406" in errors[n]["message"]:
|
8103
|
+
errors[n] = {"Error 406 (Not Acceptable)": url}
|
8104
|
+
elif "status of 407" in errors[n]["message"]:
|
8105
|
+
errors[n] = {"Error 407 (Proxy Auth Required)": url}
|
8106
|
+
elif "status of 408" in errors[n]["message"]:
|
8107
|
+
errors[n] = {"Error 408 (Request Timeout)": url}
|
8108
|
+
elif "status of 409" in errors[n]["message"]:
|
8109
|
+
errors[n] = {"Error 409 (Conflict)": url}
|
8110
|
+
elif "status of 410" in errors[n]["message"]:
|
8111
|
+
errors[n] = {"Error 410 (Gone)": url}
|
8112
|
+
else:
|
8113
|
+
errors[n] = {"Failed to load resource": url}
|
8095
8114
|
elif u_c_s_e in errors[n]["message"]:
|
8096
8115
|
url = errors[n]["message"].split(u_c_s_e)[0]
|
8097
8116
|
error = errors[n]["message"].split(u_c_s_e)[1]
|
@@ -781,6 +781,23 @@ def Driver(
|
|
781
781
|
swiftshader = False
|
782
782
|
if locale is not None and locale_code is None:
|
783
783
|
locale_code = locale
|
784
|
+
if locale_code is None:
|
785
|
+
if '--locale="' in arg_join:
|
786
|
+
locale_code = (
|
787
|
+
arg_join.split('--locale="')[1].split('"')[0]
|
788
|
+
)
|
789
|
+
elif '--locale=' in arg_join:
|
790
|
+
locale_code = (
|
791
|
+
arg_join.split('--locale=')[1].split(' ')[0]
|
792
|
+
)
|
793
|
+
elif '--locale-code="' in arg_join:
|
794
|
+
locale_code = (
|
795
|
+
arg_join.split('--locale-code="')[1].split('"')[0]
|
796
|
+
)
|
797
|
+
elif '--locale-code=' in arg_join:
|
798
|
+
locale_code = (
|
799
|
+
arg_join.split('--locale-code=')[1].split(' ')[0]
|
800
|
+
)
|
784
801
|
if ad_block is not None and ad_block_on is None:
|
785
802
|
ad_block_on = ad_block
|
786
803
|
if ad_block_on is None:
|
@@ -942,6 +942,23 @@ def SB(
|
|
942
942
|
swiftshader = False
|
943
943
|
if locale is not None and locale_code is None:
|
944
944
|
locale_code = locale
|
945
|
+
if locale_code is None:
|
946
|
+
if '--locale="' in arg_join:
|
947
|
+
locale_code = (
|
948
|
+
arg_join.split('--locale="')[1].split('"')[0]
|
949
|
+
)
|
950
|
+
elif '--locale=' in arg_join:
|
951
|
+
locale_code = (
|
952
|
+
arg_join.split('--locale=')[1].split(' ')[0]
|
953
|
+
)
|
954
|
+
elif '--locale-code="' in arg_join:
|
955
|
+
locale_code = (
|
956
|
+
arg_join.split('--locale-code="')[1].split('"')[0]
|
957
|
+
)
|
958
|
+
elif '--locale-code=' in arg_join:
|
959
|
+
locale_code = (
|
960
|
+
arg_join.split('--locale-code=')[1].split(' ')[0]
|
961
|
+
)
|
945
962
|
if ad_block is not None and ad_block_on is None:
|
946
963
|
ad_block_on = ad_block
|
947
964
|
if ad_block_on is None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.35.
|
3
|
+
Version: 4.35.6
|
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
|
@@ -68,7 +68,7 @@ Requires-Dist: attrs>=25.1.0
|
|
68
68
|
Requires-Dist: certifi>=2025.1.31
|
69
69
|
Requires-Dist: exceptiongroup>=1.2.2
|
70
70
|
Requires-Dist: websockets~=13.1; python_version < "3.9"
|
71
|
-
Requires-Dist: websockets>=15.0; python_version >= "3.9"
|
71
|
+
Requires-Dist: websockets>=15.0.1; python_version >= "3.9"
|
72
72
|
Requires-Dist: filelock~=3.16.1; python_version < "3.9"
|
73
73
|
Requires-Dist: filelock>=3.17.0; python_version >= "3.9"
|
74
74
|
Requires-Dist: fasteners>=0.19
|
@@ -79,7 +79,7 @@ Requires-Dist: typing-extensions>=4.12.2
|
|
79
79
|
Requires-Dist: sbvirtualdisplay>=1.4.0
|
80
80
|
Requires-Dist: MarkupSafe==2.1.5; python_version < "3.9"
|
81
81
|
Requires-Dist: MarkupSafe>=3.0.2; python_version >= "3.9"
|
82
|
-
Requires-Dist: Jinja2>=3.1.
|
82
|
+
Requires-Dist: Jinja2>=3.1.6
|
83
83
|
Requires-Dist: six>=1.17.0
|
84
84
|
Requires-Dist: parse>=1.20.2
|
85
85
|
Requires-Dist: parse-type>=0.6.4
|
@@ -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=Qk_EEqY0cnPtJGo10493AM6wgrednIw-0Fi8Wg6TZTY,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=jI_VTZIK_kDMRi_xromXvTjw1MYaJhFABda-r8ezLPc,238683
|
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=aIOcu9dSugOubPl93nrNrG0pE1ljPs15GtAXb9Lvmm0,723904
|
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
|
@@ -86,11 +86,11 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
86
86
|
seleniumbase/plugins/base_plugin.py,sha256=ItLgtaZmu_363iycy8BNX0Do5LyIWGiTMLW6krXM-WQ,14748
|
87
87
|
seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2ny6rR9AMWk,2108
|
88
88
|
seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
|
89
|
-
seleniumbase/plugins/driver_manager.py,sha256=
|
89
|
+
seleniumbase/plugins/driver_manager.py,sha256=1l4fxISvGV62gfDxp3yfYE2zz4WKJFLE0tGnVZIDG1g,36491
|
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=D-Aes1I7cA59XrHBZhLTLimNTtSU_3bVjhwobx8wjDU,56863
|
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
|
@@ -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.35.
|
139
|
-
seleniumbase-4.35.
|
140
|
-
seleniumbase-4.35.
|
141
|
-
seleniumbase-4.35.
|
142
|
-
seleniumbase-4.35.
|
143
|
-
seleniumbase-4.35.
|
138
|
+
seleniumbase-4.35.6.dist-info/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.35.6.dist-info/METADATA,sha256=we_9vLwuqFaRKPLMxpz9Fq2YSRWK7z5NVZtnTa6wqYY,86527
|
140
|
+
seleniumbase-4.35.6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
141
|
+
seleniumbase-4.35.6.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.35.6.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.35.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|