seleniumbase 4.38.2__py3-none-any.whl → 4.38.3__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.38.2"
2
+ __version__ = "4.38.3"
@@ -404,7 +404,7 @@ def uc_special_open_if_cf(
404
404
  special = True
405
405
  if status_str == "403" or status_str == "429":
406
406
  time.sleep(0.06) # Forbidden / Blocked! (Wait first!)
407
- if special:
407
+ if special and not hasattr(driver, "cdp_base"):
408
408
  time.sleep(0.05)
409
409
  with driver:
410
410
  driver.execute_script('window.open("%s","_blank");' % url)
@@ -472,9 +472,12 @@ def uc_open_with_tab(driver, url):
472
472
  time.sleep(0.3)
473
473
  return
474
474
  if (url.startswith("http:") or url.startswith("https:")):
475
- with driver:
476
- driver.execute_script('window.open("%s","_blank");' % url)
477
- driver.close()
475
+ if not hasattr(driver, "cdp_base"):
476
+ with driver:
477
+ driver.execute_script('window.open("%s","_blank");' % url)
478
+ driver.close()
479
+ else:
480
+ driver.cdp.open(url)
478
481
  page_actions.switch_to_window(driver, driver.window_handles[-1], 2)
479
482
  else:
480
483
  driver.default_get(url) # The original one
@@ -492,9 +495,12 @@ def uc_open_with_reconnect(driver, url, reconnect_time=None):
492
495
  reconnect_time = constants.UC.RECONNECT_TIME
493
496
  if (url.startswith("http:") or url.startswith("https:")):
494
497
  script = 'window.open("%s","_blank");' % url
495
- driver.execute_script(script)
496
- time.sleep(0.05)
497
- driver.close()
498
+ if not hasattr(driver, "cdp_base"):
499
+ driver.execute_script(script)
500
+ time.sleep(0.05)
501
+ driver.close()
502
+ else:
503
+ driver.cdp.open(url)
498
504
  if reconnect_time == "disconnect":
499
505
  driver.disconnect()
500
506
  time.sleep(0.008)
@@ -7678,10 +7678,13 @@ class BaseCase(unittest.TestCase):
7678
7678
  break
7679
7679
  time.sleep(1)
7680
7680
  if not found and not os.path.exists(downloaded_file_path):
7681
+ plural = "s"
7682
+ if timeout == 1:
7683
+ plural = ""
7681
7684
  message = (
7682
7685
  "File {%s} was not found in the downloads folder {%s} "
7683
- "after %s seconds! (Or the download didn't complete!)"
7684
- % (file, df, timeout)
7686
+ "after %s second%s! (Or the download didn't complete!)"
7687
+ % (file, df, timeout, plural)
7685
7688
  )
7686
7689
  page_actions.timeout_exception("NoSuchFileException", message)
7687
7690
  if self.recorder_mode and self.__current_url_is_recordable():
@@ -7735,10 +7738,13 @@ class BaseCase(unittest.TestCase):
7735
7738
  break
7736
7739
  time.sleep(1)
7737
7740
  if not found:
7741
+ plural = "s"
7742
+ if timeout == 1:
7743
+ plural = ""
7738
7744
  message = (
7739
7745
  "Regex {%s} was not found in the downloads folder {%s} "
7740
- "after %s seconds! (Or the download didn't complete!)"
7741
- % (regex, df, timeout)
7746
+ "after %s second%s! (Or the download didn't complete!)"
7747
+ % (regex, df, timeout, plural)
7742
7748
  )
7743
7749
  page_actions.timeout_exception("NoSuchFileException", message)
7744
7750
  if self.demo_mode:
@@ -8262,7 +8268,10 @@ class BaseCase(unittest.TestCase):
8262
8268
  In CDP Mode, the CDP-Driver controls the web browser.
8263
8269
  The CDP-Driver can be connected while WebDriver isn't.
8264
8270
  """
8265
- return self.driver.is_connected()
8271
+ if hasattr(self.driver, "is_connected"):
8272
+ return self.driver.is_connected()
8273
+ else:
8274
+ return True
8266
8275
 
8267
8276
  def is_chromium(self):
8268
8277
  """Return True if the browser is Chrome or Edge."""
@@ -10174,9 +10183,13 @@ class BaseCase(unittest.TestCase):
10174
10183
  if now_ms >= stop_ms:
10175
10184
  break
10176
10185
  time.sleep(0.2)
10177
- message = "Link text {%s} was not found after %s seconds!" % (
10186
+ plural = "s"
10187
+ if timeout == 1:
10188
+ plural = ""
10189
+ message = "Link text {%s} was not found after %s second%s!" % (
10178
10190
  link_text,
10179
10191
  timeout,
10192
+ plural,
10180
10193
  )
10181
10194
  page_actions.timeout_exception("LinkTextNotFoundException", message)
10182
10195
 
@@ -10199,9 +10212,12 @@ class BaseCase(unittest.TestCase):
10199
10212
  if now_ms >= stop_ms:
10200
10213
  break
10201
10214
  time.sleep(0.2)
10215
+ plural = "s"
10216
+ if timeout == 1:
10217
+ plural = ""
10202
10218
  message = (
10203
- "Partial Link text {%s} was not found after %s seconds!"
10204
- "" % (link_text, timeout)
10219
+ "Partial Link text {%s} was not found after %s second%s!"
10220
+ "" % (link_text, timeout, plural)
10205
10221
  )
10206
10222
  page_actions.timeout_exception("LinkTextNotFoundException", message)
10207
10223
 
@@ -14409,9 +14425,12 @@ class BaseCase(unittest.TestCase):
14409
14425
  if must_be_visible and is_present:
14410
14426
  error = "not visible"
14411
14427
  the_exception = "ElementNotVisibleException"
14428
+ plural = "s"
14429
+ if timeout == 1:
14430
+ plural = ""
14412
14431
  msg = (
14413
- "Shadow DOM Element {%s} was %s after %s seconds!"
14414
- % (selector_chain, error, timeout)
14432
+ "Shadow DOM Element {%s} was %s after %s second%s!"
14433
+ % (selector_chain, error, timeout, plural)
14415
14434
  )
14416
14435
  page_actions.timeout_exception(the_exception, msg)
14417
14436
  return element
@@ -493,6 +493,8 @@ class Tab(Connection):
493
493
  search_id, nresult = await self.send(
494
494
  cdp.dom.perform_search(text, True)
495
495
  )
496
+ if not nresult:
497
+ return []
496
498
  if nresult:
497
499
  node_ids = await self.send(
498
500
  cdp.dom.get_search_results(search_id, 0, nresult)
@@ -584,6 +586,8 @@ class Tab(Connection):
584
586
  search_id, nresult = await self.send(
585
587
  cdp.dom.perform_search(text, True)
586
588
  )
589
+ if not nresult:
590
+ return
587
591
  node_ids = await self.send(
588
592
  cdp.dom.get_search_results(search_id, 0, nresult)
589
593
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.38.2
3
+ Version: 4.38.3
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.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.4.0; python_version >= "3.10"
66
+ Requires-Dist: setuptools>=80.8.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
@@ -112,7 +112,8 @@ Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
112
112
  Requires-Dist: sortedcontainers==2.4.0
113
113
  Requires-Dist: execnet==2.1.1
114
114
  Requires-Dist: iniconfig==2.1.0
115
- Requires-Dist: pluggy==1.5.0
115
+ Requires-Dist: pluggy==1.5.0; python_version < "3.9"
116
+ Requires-Dist: pluggy==1.6.0; python_version >= "3.9"
116
117
  Requires-Dist: pytest==8.3.5
117
118
  Requires-Dist: pytest-html==4.0.2
118
119
  Requires-Dist: pytest-metadata==3.1.1
@@ -135,7 +136,7 @@ Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
135
136
  Requires-Dist: allure-behave>=2.13.5; extra == "allure"
136
137
  Provides-Extra: coverage
137
138
  Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
138
- Requires-Dist: coverage>=7.8.0; python_version >= "3.9" and extra == "coverage"
139
+ Requires-Dist: coverage>=7.8.1; python_version >= "3.9" and extra == "coverage"
139
140
  Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
140
141
  Requires-Dist: pytest-cov>=6.1.1; python_version >= "3.9" and extra == "coverage"
141
142
  Provides-Extra: flake8
@@ -156,7 +157,7 @@ Provides-Extra: pdfminer
156
157
  Requires-Dist: pdfminer.six==20250324; python_version < "3.9" and extra == "pdfminer"
157
158
  Requires-Dist: pdfminer.six==20250506; python_version >= "3.9" and extra == "pdfminer"
158
159
  Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
159
- Requires-Dist: cryptography==44.0.3; python_version >= "3.9" and extra == "pdfminer"
160
+ Requires-Dist: cryptography==45.0.2; python_version >= "3.9" and extra == "pdfminer"
160
161
  Requires-Dist: cffi==1.17.1; extra == "pdfminer"
161
162
  Requires-Dist: pycparser==2.22; extra == "pdfminer"
162
163
  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=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
5
5
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
6
- seleniumbase/__version__.py,sha256=bsY8XDCU_mDHLAXxIoictwDOAzC19DD5eRtXO16imok,46
6
+ seleniumbase/__version__.py,sha256=yES8EmUkIFb8NQimY5PDyFOPmtf58Bah5sKLqF3tO8M,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=Q_4MHHnF_CnnYuO8_xcogC_idc_Vp3-WWODAYk-_Qjc,241317
39
+ seleniumbase/core/browser_launcher.py,sha256=8t9wHj7hiGrTC3SHlPi7AhTAX8y9XnV5Y6bgLWFkuVE,241559
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=wUgv1e1Y7EJKTJgWr0JrMt_V4dvuAXjpllkQa1-ryp4,726416
68
+ seleniumbase/fixtures/base_case.py,sha256=D5UuI8vHaZKYkVBQb_49NZXsLHDBsyF6SOQ76s5biSE,726962
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
@@ -120,7 +120,7 @@ seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=c4z2ltGeAKoLE8eyviJUxEM1GW
120
120
  seleniumbase/undetected/cdp_driver/config.py,sha256=t8KV1Vqa5SQRBq3-gjkHHmj9h85AplAM01asO3AWufs,12507
121
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
- seleniumbase/undetected/cdp_driver/tab.py,sha256=wRfeoJwed9OO7SsvdWRIfRRduNFDT1Rl-mBACHf3ZKM,53077
123
+ seleniumbase/undetected/cdp_driver/tab.py,sha256=t7Ucn0pmm7imwdCM-5KmIJNU2MCeMuIl6G3T2VMrbxU,53170
124
124
  seleniumbase/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
125
  seleniumbase/utilities/selenium_grid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
126
126
  seleniumbase/utilities/selenium_grid/download_selenium_server.py,sha256=ZdoInIbhtmdKCIPxxtJHhd2sqotqcNXWMYbwWrkh9O0,1727
@@ -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.38.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
139
- seleniumbase-4.38.2.dist-info/METADATA,sha256=WEO2jkAdfKevEDcIfx6BsB5e1_sN9L0lWEEr8jAiB7w,86958
140
- seleniumbase-4.38.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
141
- seleniumbase-4.38.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
142
- seleniumbase-4.38.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
143
- seleniumbase-4.38.2.dist-info/RECORD,,
138
+ seleniumbase-4.38.3.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
139
+ seleniumbase-4.38.3.dist-info/METADATA,sha256=Gpf1Nwx7FSwxCppzt5zbTiLDTlklDLR3kSLrpzHW9As,87036
140
+ seleniumbase-4.38.3.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
141
+ seleniumbase-4.38.3.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
142
+ seleniumbase-4.38.3.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
143
+ seleniumbase-4.38.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5