seleniumbase 4.35.4__py3-none-any.whl → 4.35.5__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.
@@ -1,2 +1,2 @@
1
1
  # seleniumbase package
2
- __version__ = "4.35.4"
2
+ __version__ = "4.35.5"
@@ -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
- "form.turnstile #turnstile-widget > div:not([class])"
1353
+ 'form [id*="turnstile"] > div:not([class])'
1326
1354
  )
1327
1355
  ):
1328
1356
  script = (
1329
1357
  """var $elements = document.querySelectorAll(
1330
- 'form.turnstile #turnstile-widget');
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:
@@ -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.4
3
+ Version: 4.35.5
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.5
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=IksyggWqGI_zELnLnvW4IXN2rTpkeGXFJtRWudNaUNM,46
6
+ seleniumbase/__version__.py,sha256=T1lBjBcbTo6uBNrj38pWR9udP-fp0cV0bMxMdM-Rlms,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=I3CdpcZGoyxe0QS6m2qt-vMgLejN66q6WRS3cPQCaV8,237064
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
@@ -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=UqWDnhOFB7GNftaSAqWFsR76vOyeaqMc0JqQKiAw3lU,35877
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=9hWfSA2DGclgQ2QMJISR8k_rF53NCMGcQbr-K5eh5Dg,56249
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.4.dist-info/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
139
- seleniumbase-4.35.4.dist-info/METADATA,sha256=QHqs05gZ1ZPiyfYeZIOBgEEY1CdCmdnktBRVsdSPWl0,86525
140
- seleniumbase-4.35.4.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
141
- seleniumbase-4.35.4.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
142
- seleniumbase-4.35.4.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
143
- seleniumbase-4.35.4.dist-info/RECORD,,
138
+ seleniumbase-4.35.5.dist-info/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
139
+ seleniumbase-4.35.5.dist-info/METADATA,sha256=pWrHHE6PpPrbq_tOBd5Emv3zSCk4LsnTa_v_NXWKwIQ,86527
140
+ seleniumbase-4.35.5.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
141
+ seleniumbase-4.35.5.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
142
+ seleniumbase-4.35.5.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
143
+ seleniumbase-4.35.5.dist-info/RECORD,,