seleniumbase 4.37.7__tar.gz → 4.37.9__tar.gz

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.
Files changed (155) hide show
  1. {seleniumbase-4.37.7/seleniumbase.egg-info → seleniumbase-4.37.9}/PKG-INFO +5 -4
  2. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/requirements.txt +4 -3
  3. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/__version__.py +1 -1
  4. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/browser_launcher.py +10 -4
  5. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/sb_cdp.py +4 -4
  6. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/base_case.py +3 -3
  7. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/sb_manager.py +4 -2
  8. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/browser.py +71 -75
  9. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/cdp_util.py +9 -0
  10. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/tab.py +28 -4
  11. {seleniumbase-4.37.7 → seleniumbase-4.37.9/seleniumbase.egg-info}/PKG-INFO +5 -4
  12. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase.egg-info/requires.txt +4 -3
  13. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/setup.py +4 -3
  14. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/.gitignore +0 -0
  15. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/LICENSE +0 -0
  16. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/MANIFEST.in +0 -0
  17. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/README.md +0 -0
  18. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/install.sh +0 -0
  19. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/pyproject.toml +0 -0
  20. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/pytest.ini +0 -0
  21. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/sbase/__init__.py +0 -0
  22. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/sbase/__main__.py +0 -0
  23. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/sbase/steps.py +0 -0
  24. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/__init__.py +0 -0
  25. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/__main__.py +0 -0
  26. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/behave/__init__.py +0 -0
  27. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/behave/behave_helper.py +0 -0
  28. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/behave/behave_sb.py +0 -0
  29. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/behave/steps.py +0 -0
  30. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/common/__init__.py +0 -0
  31. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/common/decorators.py +0 -0
  32. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/common/encryption.py +0 -0
  33. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/common/exceptions.py +0 -0
  34. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/common/obfuscate.py +0 -0
  35. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/common/unobfuscate.py +0 -0
  36. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/config/__init__.py +0 -0
  37. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/config/ad_block_list.py +0 -0
  38. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/config/proxy_list.py +0 -0
  39. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/config/settings.py +0 -0
  40. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/__init__.py +0 -0
  41. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/logo_helper.py +0 -0
  42. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/rich_helper.py +0 -0
  43. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/run.py +0 -0
  44. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_behave_gui.py +0 -0
  45. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_caseplans.py +0 -0
  46. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_commander.py +0 -0
  47. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_install.py +0 -0
  48. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_mkchart.py +0 -0
  49. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_mkdir.py +0 -0
  50. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_mkfile.py +0 -0
  51. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_mkpres.py +0 -0
  52. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_mkrec.py +0 -0
  53. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_objectify.py +0 -0
  54. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_print.py +0 -0
  55. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/console_scripts/sb_recorder.py +0 -0
  56. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/__init__.py +0 -0
  57. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/application_manager.py +0 -0
  58. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/capabilities_parser.py +0 -0
  59. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/colored_traceback.py +0 -0
  60. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/create_db_tables.sql +0 -0
  61. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/detect_b_ver.py +0 -0
  62. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/download_helper.py +0 -0
  63. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/encoded_images.py +0 -0
  64. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/jqc_helper.py +0 -0
  65. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/log_helper.py +0 -0
  66. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/mysql.py +0 -0
  67. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/proxy_helper.py +0 -0
  68. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/recorder_helper.py +0 -0
  69. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/report_helper.py +0 -0
  70. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/s3_manager.py +0 -0
  71. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/sb_driver.py +0 -0
  72. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/session_helper.py +0 -0
  73. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/settings_parser.py +0 -0
  74. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/style_sheet.py +0 -0
  75. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/testcase_manager.py +0 -0
  76. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/tour_helper.py +0 -0
  77. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/core/visual_helper.py +0 -0
  78. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/drivers/__init__.py +0 -0
  79. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/extensions/__init__.py +0 -0
  80. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/extensions/ad_block.zip +0 -0
  81. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/extensions/disable_csp.zip +0 -0
  82. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/extensions/recorder.zip +0 -0
  83. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/extensions/sbase_ext.zip +0 -0
  84. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/__init__.py +0 -0
  85. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/constants.py +0 -0
  86. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/css_to_xpath.py +0 -0
  87. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/errors.py +0 -0
  88. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/js_utils.py +0 -0
  89. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/page_actions.py +0 -0
  90. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/page_utils.py +0 -0
  91. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/shared_utils.py +0 -0
  92. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/unittest_helper.py +0 -0
  93. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/words.py +0 -0
  94. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/fixtures/xpath_to_css.py +0 -0
  95. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/js_code/__init__.py +0 -0
  96. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/js_code/active_css_js.py +0 -0
  97. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/js_code/live_js.py +0 -0
  98. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/js_code/recorder_js.py +0 -0
  99. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/masterqa/__init__.py +0 -0
  100. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/masterqa/master_qa.py +0 -0
  101. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/__init__.py +0 -0
  102. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/base_plugin.py +0 -0
  103. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/basic_test_info.py +0 -0
  104. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/db_reporting_plugin.py +0 -0
  105. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/driver_manager.py +0 -0
  106. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/page_source.py +0 -0
  107. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/pytest_plugin.py +0 -0
  108. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/s3_logging_plugin.py +0 -0
  109. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/screen_shots.py +0 -0
  110. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/plugins/selenium_plugin.py +0 -0
  111. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/resources/__init__.py +0 -0
  112. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/__init__.py +0 -0
  113. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/chinese.py +0 -0
  114. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/dutch.py +0 -0
  115. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/french.py +0 -0
  116. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/italian.py +0 -0
  117. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/japanese.py +0 -0
  118. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/korean.py +0 -0
  119. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/master_dict.py +0 -0
  120. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/portuguese.py +0 -0
  121. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/russian.py +0 -0
  122. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/spanish.py +0 -0
  123. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/translate/translator.py +0 -0
  124. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/__init__.py +0 -0
  125. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp.py +0 -0
  126. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/__init__.py +0 -0
  127. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/_contradict.py +0 -0
  128. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/config.py +0 -0
  129. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/connection.py +0 -0
  130. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/cdp_driver/element.py +0 -0
  131. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/dprocess.py +0 -0
  132. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/options.py +0 -0
  133. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/patcher.py +0 -0
  134. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/reactor.py +0 -0
  135. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/undetected/webelement.py +0 -0
  136. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/__init__.py +0 -0
  137. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/__init__.py +0 -0
  138. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/download_selenium_server.py +0 -0
  139. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/font_color +0 -0
  140. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/grid-hub +0 -0
  141. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/grid-node +0 -0
  142. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/grid_hub.py +0 -0
  143. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/grid_node.py +0 -0
  144. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/register-grid-node.bat +0 -0
  145. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/register-grid-node.sh +0 -0
  146. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat +0 -0
  147. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh +0 -0
  148. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_ide/__init__.py +0 -0
  149. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase/utilities/selenium_ide/convert_ide.py +0 -0
  150. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase.egg-info/SOURCES.txt +0 -0
  151. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase.egg-info/dependency_links.txt +0 -0
  152. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase.egg-info/entry_points.txt +0 -0
  153. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/seleniumbase.egg-info/top_level.txt +0 -0
  154. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/setup.cfg +0 -0
  155. {seleniumbase-4.37.7 → seleniumbase-4.37.9}/virtualenv_install.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.37.7
3
+ Version: 4.37.9
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
@@ -59,13 +59,14 @@ Classifier: Topic :: Utilities
59
59
  Requires-Python: >=3.8
60
60
  Description-Content-Type: text/markdown
61
61
  License-File: LICENSE
62
- Requires-Dist: pip>=25.0.1
62
+ Requires-Dist: pip>=25.0.1; python_version < "3.9"
63
+ Requires-Dist: pip>=25.1; python_version >= "3.9"
63
64
  Requires-Dist: packaging>=25.0
64
65
  Requires-Dist: setuptools~=70.2; python_version < "3.10"
65
- Requires-Dist: setuptools>=79.0.1; python_version >= "3.10"
66
+ Requires-Dist: setuptools>=80.0.0; python_version >= "3.10"
66
67
  Requires-Dist: wheel>=0.45.1
67
68
  Requires-Dist: attrs>=25.3.0
68
- Requires-Dist: certifi>=2025.1.31
69
+ Requires-Dist: certifi>=2025.4.26
69
70
  Requires-Dist: exceptiongroup>=1.2.2
70
71
  Requires-Dist: websockets~=13.1; python_version < "3.9"
71
72
  Requires-Dist: websockets>=15.0.1; python_version >= "3.9"
@@ -1,10 +1,11 @@
1
- pip>=25.0.1
1
+ pip>=25.0.1;python_version<"3.9"
2
+ pip>=25.1;python_version>="3.9"
2
3
  packaging>=25.0
3
4
  setuptools~=70.2;python_version<"3.10"
4
- setuptools>=79.0.1;python_version>="3.10"
5
+ setuptools>=80.0.0;python_version>="3.10"
5
6
  wheel>=0.45.1
6
7
  attrs>=25.3.0
7
- certifi>=2025.1.31
8
+ certifi>=2025.4.26
8
9
  exceptiongroup>=1.2.2
9
10
  websockets~=13.1;python_version<"3.9"
10
11
  websockets>=15.0.1;python_version>="3.9"
@@ -1,2 +1,2 @@
1
1
  # seleniumbase package
2
- __version__ = "4.37.7"
2
+ __version__ = "4.37.9"
@@ -515,7 +515,7 @@ def uc_open_with_reconnect(driver, url, reconnect_time=None):
515
515
  return None
516
516
 
517
517
 
518
- def uc_open_with_cdp_mode(driver, url=None):
518
+ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
519
519
  import asyncio
520
520
  from seleniumbase.undetected.cdp_driver import cdp_util
521
521
 
@@ -546,12 +546,15 @@ def uc_open_with_cdp_mode(driver, url=None):
546
546
  headless = False
547
547
  headed = None
548
548
  xvfb = None
549
+ binary_location = None
549
550
  if hasattr(sb_config, "headless"):
550
551
  headless = sb_config.headless
551
552
  if hasattr(sb_config, "headed"):
552
553
  headed = sb_config.headed
553
554
  if hasattr(sb_config, "xvfb"):
554
555
  xvfb = sb_config.xvfb
556
+ if hasattr(sb_config, "binary_location"):
557
+ binary_location = sb_config.binary_location
555
558
 
556
559
  loop = asyncio.new_event_loop()
557
560
  asyncio.set_event_loop(loop)
@@ -562,6 +565,7 @@ def uc_open_with_cdp_mode(driver, url=None):
562
565
  headless=headless,
563
566
  headed=headed,
564
567
  xvfb=xvfb,
568
+ browser_executable_path=binary_location,
565
569
  )
566
570
  )
567
571
  loop.run_until_complete(driver.cdp_base.wait(0))
@@ -603,7 +607,9 @@ def uc_open_with_cdp_mode(driver, url=None):
603
607
  loop.run_until_complete(page_tab.activate())
604
608
 
605
609
  loop.run_until_complete(driver.cdp_base.update_targets())
606
- page = loop.run_until_complete(driver.cdp_base.get(url))
610
+ page = loop.run_until_complete(
611
+ driver.cdp_base.get(url, **kwargs)
612
+ )
607
613
  with gui_lock:
608
614
  with suppress(Exception):
609
615
  shared_utils.make_writable(constants.MultiBrowser.PYAUTOGUILOCK)
@@ -788,8 +794,8 @@ def uc_open_with_cdp_mode(driver, url=None):
788
794
  driver._is_using_cdp = True
789
795
 
790
796
 
791
- def uc_activate_cdp_mode(driver, url=None):
792
- uc_open_with_cdp_mode(driver, url=url)
797
+ def uc_activate_cdp_mode(driver, url=None, **kwargs):
798
+ uc_open_with_cdp_mode(driver, url=url, **kwargs)
793
799
 
794
800
 
795
801
  def uc_open_with_disconnect(driver, url, timeout=None):
@@ -101,12 +101,12 @@ class CDPMethods():
101
101
  element.get_parent = lambda: self.__get_parent(element)
102
102
  return element
103
103
 
104
- def get(self, url):
104
+ def get(self, url, **kwargs):
105
105
  url = shared_utils.fix_url_as_needed(url)
106
106
  driver = self.driver
107
107
  if hasattr(driver, "cdp_base"):
108
108
  driver = driver.cdp_base
109
- self.loop.run_until_complete(self.page.get(url))
109
+ self.loop.run_until_complete(self.page.get(url, **kwargs))
110
110
  url_protocol = url.split(":")[0]
111
111
  safe_url = True
112
112
  if url_protocol not in ["about", "data", "chrome"]:
@@ -120,8 +120,8 @@ class CDPMethods():
120
120
  self.__slow_mode_pause_if_set()
121
121
  self.loop.run_until_complete(self.page.wait())
122
122
 
123
- def open(self, url):
124
- self.get(url)
123
+ def open(self, url, **kwargs):
124
+ self.get(url, **kwargs)
125
125
 
126
126
  def reload(self, ignore_cache=True, script_to_evaluate_on_load=None):
127
127
  self.loop.run_until_complete(
@@ -4870,7 +4870,7 @@ class BaseCase(unittest.TestCase):
4870
4870
  script = """document.designMode = 'off';"""
4871
4871
  self.execute_script(script)
4872
4872
 
4873
- def activate_cdp_mode(self, url=None):
4873
+ def activate_cdp_mode(self, url=None, **kwargs):
4874
4874
  if hasattr(self.driver, "_is_using_uc") and self.driver._is_using_uc:
4875
4875
  if self.__is_cdp_swap_needed():
4876
4876
  return # CDP Mode is already active
@@ -4879,10 +4879,10 @@ class BaseCase(unittest.TestCase):
4879
4879
  current_url = self.get_current_url()
4880
4880
  if not current_url.startswith(("about", "data", "chrome")):
4881
4881
  self.get_new_driver(undetectable=True)
4882
- self.driver.uc_open_with_cdp_mode(url)
4882
+ self.driver.uc_open_with_cdp_mode(url, **kwargs)
4883
4883
  else:
4884
4884
  self.get_new_driver(undetectable=True)
4885
- self.driver.uc_open_with_cdp_mode(url)
4885
+ self.driver.uc_open_with_cdp_mode(url, **kwargs)
4886
4886
  self.cdp = self.driver.cdp
4887
4887
 
4888
4888
  def activate_recorder(self):
@@ -1234,7 +1234,8 @@ def SB(
1234
1234
  sb._has_failure = False # This may change
1235
1235
 
1236
1236
  with suppress(Exception):
1237
- stack_base = traceback.format_stack()[0].split(os.sep)[-1]
1237
+ stack_base = traceback.format_stack()[0].split("with SB(")[0]
1238
+ stack_base = stack_base.split(os.sep)[-1]
1238
1239
  test_base = stack_base.split(", in ")[0]
1239
1240
  filename = test_base.split('"')[0]
1240
1241
  methodname = ".line_" + test_base.split(", line ")[-1]
@@ -1251,7 +1252,8 @@ def SB(
1251
1252
  c1 = colorama.Fore.GREEN
1252
1253
  b1 = colorama.Style.BRIGHT
1253
1254
  cr = colorama.Style.RESET_ALL
1254
- stack_base = traceback.format_stack()[0].split(os.sep)[-1]
1255
+ stack_base = traceback.format_stack()[0].split("with SB(")[0]
1256
+ stack_base = stack_base.split(os.sep)[-1]
1255
1257
  test_name = stack_base.split(", in ")[0].replace('", line ', ":")
1256
1258
  test_name += ":SB"
1257
1259
  start_text = "=== {%s} starts ===" % test_name
@@ -46,9 +46,8 @@ def deconstruct_browser():
46
46
  logger.debug(
47
47
  "Problem removing data dir %s\n"
48
48
  "Consider checking whether it's there "
49
- "and remove it by hand\nerror: %s",
50
- _.config.user_data_dir,
51
- e,
49
+ "and remove it by hand\nerror: %s"
50
+ % (_.config.user_data_dir, e)
52
51
  )
53
52
  break
54
53
  time.sleep(0.15)
@@ -190,7 +189,7 @@ class Browser:
190
189
 
191
190
  sleep = wait
192
191
  """Alias for wait"""
193
- def _handle_target_update(
192
+ async def _handle_target_update(
194
193
  self,
195
194
  event: Union[
196
195
  cdp.target.TargetInfoChanged,
@@ -224,21 +223,21 @@ class Browser:
224
223
  current_tab.target = target_info
225
224
  elif isinstance(event, cdp.target.TargetCreated):
226
225
  target_info: cdp.target.TargetInfo = event.target_info
227
- from .tab import Tab
228
-
229
- new_target = Tab(
230
- (
231
- f"ws://{self.config.host}:{self.config.port}"
232
- f"/devtools/{target_info.type_ or 'page'}"
233
- f"/{target_info.target_id}"
234
- ),
235
- target=target_info,
236
- browser=self,
237
- )
238
- self.targets.append(new_target)
239
- logger.debug(
240
- "Target #%d created => %s", len(self.targets), new_target
226
+ websocket_url = (
227
+ f"ws://{self.config.host}:{self.config.port}"
228
+ f"/devtools/{target_info.type_ or 'page'}"
229
+ f"/{target_info.target_id}"
241
230
  )
231
+ async with tab.Tab(
232
+ websocket_url=websocket_url,
233
+ target=target_info,
234
+ browser=self
235
+ ) as new_target:
236
+ self.targets.append(new_target)
237
+ logger.debug(
238
+ "Target #%d created => %s"
239
+ % (len(self.targets), new_target)
240
+ )
242
241
  elif isinstance(event, cdp.target.TargetDestroyed):
243
242
  current_tab = next(
244
243
  filter(
@@ -257,6 +256,7 @@ class Browser:
257
256
  url="about:blank",
258
257
  new_tab: bool = False,
259
258
  new_window: bool = False,
259
+ **kwargs,
260
260
  ) -> tab.Tab:
261
261
  """Top level get. Utilizes the first tab to retrieve given url.
262
262
  Convenience function known from selenium.
@@ -287,62 +287,62 @@ class Browser:
287
287
  connection: tab.Tab = next(
288
288
  filter(lambda item: item.type_ == "page", self.targets)
289
289
  )
290
- if hasattr(sb_config, "_cdp_locale") and sb_config._cdp_locale:
291
- await connection.send(cdp.page.navigate("about:blank"))
292
- if (
293
- hasattr(sb_config, "_cdp_user_agent")
294
- and sb_config._cdp_user_agent
295
- ):
296
- pass
297
- elif (
298
- hasattr(sb_config, "_cdp_platform")
299
- and sb_config._cdp_platform
300
- ):
301
- pass
302
- else:
303
- await connection.set_locale(sb_config._cdp_locale)
304
- if hasattr(sb_config, "_cdp_timezone") and sb_config._cdp_timezone:
305
- await connection.send(cdp.page.navigate("about:blank"))
306
- await connection.set_timezone(sb_config._cdp_timezone)
290
+ _cdp_timezone = None
291
+ _cdp_user_agent = ""
292
+ _cdp_locale = None
293
+ _cdp_platform = None
294
+ _cdp_geolocation = None
295
+ if (
296
+ hasattr(sb_config, "_cdp_timezone") and sb_config._cdp_timezone
297
+ ):
298
+ _cdp_timezone = sb_config._cdp_timezone
307
299
  if (
308
300
  hasattr(sb_config, "_cdp_user_agent")
309
301
  and sb_config._cdp_user_agent
310
302
  ):
311
- await connection.send(cdp.page.navigate("about:blank"))
312
- if hasattr(sb_config, "_cdp_locale") and sb_config._cdp_locale:
313
- _cdp_platform = None
314
- if (
315
- hasattr(sb_config, "_cdp_platform")
316
- and sb_config._cdp_platform
317
- ):
318
- _cdp_platform = sb_config._cdp_platform
319
- await connection.set_user_agent(
320
- sb_config._cdp_user_agent,
321
- sb_config._cdp_locale,
322
- _cdp_platform,
323
- )
324
- else:
325
- await connection.set_user_agent(sb_config._cdp_user_agent)
326
- elif (
327
- hasattr(sb_config, "_cdp_platform") and sb_config._cdp_platform
328
- ):
329
- await connection.send(cdp.page.navigate("about:blank"))
330
- if hasattr(sb_config, "_cdp_locale") and sb_config._cdp_locale:
331
- _cdp_platform = sb_config._cdp_platform
332
- await connection.set_user_agent(
333
- accept_language=sb_config._cdp_locale,
334
- platform=_cdp_platform,
335
- )
336
- else:
337
- await connection.set_user_agent(
338
- platform=sb_config._cdp_platform
339
- )
303
+ _cdp_user_agent = sb_config._cdp_user_agent
304
+ if hasattr(sb_config, "_cdp_locale") and sb_config._cdp_locale:
305
+ _cdp_locale = sb_config._cdp_locale
306
+ if hasattr(sb_config, "_cdp_platform") and sb_config._cdp_platform:
307
+ _cdp_platform = sb_config._cdp_platform
340
308
  if (
341
309
  hasattr(sb_config, "_cdp_geolocation")
342
310
  and sb_config._cdp_geolocation
343
311
  ):
312
+ _cdp_geolocation = sb_config._cdp_geolocation
313
+ if "timezone" in kwargs:
314
+ _cdp_timezone = kwargs["timezone"]
315
+ elif "tzone" in kwargs:
316
+ _cdp_timezone = kwargs["tzone"]
317
+ if "user_agent" in kwargs:
318
+ _cdp_user_agent = kwargs["user_agent"]
319
+ elif "agent" in kwargs:
320
+ _cdp_user_agent = kwargs["agent"]
321
+ if "locale" in kwargs:
322
+ _cdp_locale = kwargs["locale"]
323
+ elif "lang" in kwargs:
324
+ _cdp_locale = kwargs["lang"]
325
+ if "platform" in kwargs:
326
+ _cdp_platform = kwargs["platform"]
327
+ elif "plat" in kwargs:
328
+ _cdp_platform = kwargs["plat"]
329
+ if "geolocation" in kwargs:
330
+ _cdp_geolocation = kwargs["geolocation"]
331
+ elif "geoloc" in kwargs:
332
+ _cdp_geolocation = kwargs["geoloc"]
333
+ if _cdp_timezone:
334
+ await connection.send(cdp.page.navigate("about:blank"))
335
+ await connection.set_timezone(_cdp_timezone)
336
+ if _cdp_user_agent or _cdp_locale or _cdp_platform:
337
+ await connection.send(cdp.page.navigate("about:blank"))
338
+ await connection.set_user_agent(
339
+ user_agent=_cdp_user_agent,
340
+ accept_language=_cdp_locale,
341
+ platform=_cdp_platform,
342
+ )
343
+ if _cdp_geolocation:
344
344
  await connection.send(cdp.page.navigate("about:blank"))
345
- await connection.set_geolocation(sb_config._cdp_geolocation)
345
+ await connection.set_geolocation(_cdp_geolocation)
346
346
  # Use the tab to navigate to new url
347
347
  frame_id, loader_id, *_ = await connection.send(
348
348
  cdp.page.navigate(url)
@@ -376,8 +376,8 @@ class Browser:
376
376
  self.config.port = util.free_port()
377
377
  if not connect_existing:
378
378
  logger.debug(
379
- "BROWSER EXECUTABLE PATH: %s",
380
- self.config.browser_executable_path,
379
+ "BROWSER EXECUTABLE PATH: %s"
380
+ % self.config.browser_executable_path,
381
381
  )
382
382
  if not pathlib.Path(self.config.browser_executable_path).exists():
383
383
  raise FileNotFoundError(
@@ -782,10 +782,8 @@ class CookieJar:
782
782
  for cookie in cookies:
783
783
  for match in pattern.finditer(str(cookie.__dict__)):
784
784
  logger.debug(
785
- "Saved cookie for matching pattern '%s' => (%s: %s)",
786
- pattern.pattern,
787
- cookie.name,
788
- cookie.value,
785
+ "Saved cookie for matching pattern '%s' => (%s: %s)"
786
+ % (pattern.pattern, cookie.name, cookie.value)
789
787
  )
790
788
  included_cookies.append(cookie)
791
789
  break
@@ -822,10 +820,8 @@ class CookieJar:
822
820
  for match in pattern.finditer(str(cookie.__dict__)):
823
821
  included_cookies.append(cookie)
824
822
  logger.debug(
825
- "Loaded cookie for matching pattern '%s' => (%s: %s)",
826
- pattern.pattern,
827
- cookie.name,
828
- cookie.value,
823
+ "Loaded cookie for matching pattern '%s' => (%s: %s)"
824
+ % (pattern.pattern, cookie.name, cookie.value)
829
825
  )
830
826
  break
831
827
  await connection.send(cdp.network.set_cookies(included_cookies))
@@ -325,6 +325,11 @@ async def start(
325
325
  ad_block_dir = os.path.join(DOWNLOADS_FOLDER, "ad_block")
326
326
  __unzip_to_new_folder(ad_block_zip, ad_block_dir)
327
327
  extension_dir = __add_chrome_ext_dir(extension_dir, ad_block_dir)
328
+ if (
329
+ "binary_location" in kwargs
330
+ and not browser_executable_path
331
+ ):
332
+ browser_executable_path = kwargs["binary_location"]
328
333
  if not config:
329
334
  config = Config(
330
335
  user_data_dir,
@@ -378,6 +383,10 @@ async def start(
378
383
  sb_config._cdp_user_agent = None
379
384
  if "platform" in kwargs:
380
385
  sb_config._cdp_platform = kwargs["platform"]
386
+ elif "plat" in kwargs:
387
+ sb_config._cdp_platform = kwargs["plat"]
388
+ else:
389
+ sb_config._cdp_platform = None
381
390
  return driver
382
391
 
383
392
 
@@ -6,6 +6,7 @@ import logging
6
6
  import pathlib
7
7
  import urllib.parse
8
8
  import warnings
9
+ from seleniumbase import config as sb_config
9
10
  from typing import Dict, List, Union, Optional, Tuple
10
11
  from . import browser as cdp_browser
11
12
  from . import element
@@ -137,6 +138,14 @@ class Tab(Connection):
137
138
  self._dom = None
138
139
  self._window_id = None
139
140
 
141
+ async def __aenter__(self):
142
+ return self
143
+
144
+ async def __aexit__(self, exc_type, exc_val, exc_tb):
145
+ await self.aclose()
146
+ if exc_type and exc_val:
147
+ raise exc_type(exc_val)
148
+
140
149
  @property
141
150
  def inspector_url(self):
142
151
  """
@@ -329,6 +338,7 @@ class Tab(Connection):
329
338
  url="about:blank",
330
339
  new_tab: bool = False,
331
340
  new_window: bool = False,
341
+ **kwargs,
332
342
  ):
333
343
  """
334
344
  Top level get. Utilizes the first tab to retrieve the given url.
@@ -348,11 +358,25 @@ class Tab(Connection):
348
358
  if new_window and not new_tab:
349
359
  new_tab = True
350
360
  if new_tab:
351
- return await self.browser.get(url, new_tab, new_window)
361
+ if hasattr(sb_config, "incognito") and sb_config.incognito:
362
+ return await self.browser.get(
363
+ url, new_tab=False, new_window=True, **kwargs
364
+ )
365
+ else:
366
+ return await self.browser.get(
367
+ url, new_tab, new_window, **kwargs
368
+ )
352
369
  else:
353
- frame_id, loader_id, *_ = await self.send(cdp.page.navigate(url))
354
- await self
355
- return self
370
+ if not kwargs:
371
+ frame_id, loader_id, *_ = await self.send(
372
+ cdp.page.navigate(url)
373
+ )
374
+ await self
375
+ return self
376
+ else:
377
+ return await self.browser.get(
378
+ url, new_tab, new_window, **kwargs
379
+ )
356
380
 
357
381
  async def query_selector_all(
358
382
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.37.7
3
+ Version: 4.37.9
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
@@ -59,13 +59,14 @@ Classifier: Topic :: Utilities
59
59
  Requires-Python: >=3.8
60
60
  Description-Content-Type: text/markdown
61
61
  License-File: LICENSE
62
- Requires-Dist: pip>=25.0.1
62
+ Requires-Dist: pip>=25.0.1; python_version < "3.9"
63
+ Requires-Dist: pip>=25.1; python_version >= "3.9"
63
64
  Requires-Dist: packaging>=25.0
64
65
  Requires-Dist: setuptools~=70.2; python_version < "3.10"
65
- Requires-Dist: setuptools>=79.0.1; python_version >= "3.10"
66
+ Requires-Dist: setuptools>=80.0.0; python_version >= "3.10"
66
67
  Requires-Dist: wheel>=0.45.1
67
68
  Requires-Dist: attrs>=25.3.0
68
- Requires-Dist: certifi>=2025.1.31
69
+ Requires-Dist: certifi>=2025.4.26
69
70
  Requires-Dist: exceptiongroup>=1.2.2
70
71
  Requires-Dist: websockets~=13.1; python_version < "3.9"
71
72
  Requires-Dist: websockets>=15.0.1; python_version >= "3.9"
@@ -1,8 +1,7 @@
1
- pip>=25.0.1
2
1
  packaging>=25.0
3
2
  wheel>=0.45.1
4
3
  attrs>=25.3.0
5
- certifi>=2025.1.31
4
+ certifi>=2025.4.26
6
5
  exceptiongroup>=1.2.2
7
6
  fasteners>=0.19
8
7
  mycdp>=1.2.0
@@ -57,6 +56,7 @@ setuptools~=70.2
57
56
  urllib3<2,>=1.26.20
58
57
 
59
58
  [:python_version < "3.9"]
59
+ pip>=25.0.1
60
60
  websockets~=13.1
61
61
  filelock~=3.16.1
62
62
  platformdirs>=4.3.6
@@ -67,10 +67,11 @@ cssselect==1.2.0
67
67
  pytest-rerunfailures==14.0
68
68
 
69
69
  [:python_version >= "3.10"]
70
- setuptools>=79.0.1
70
+ setuptools>=80.0.0
71
71
  urllib3<2.5.0,>=1.26.20
72
72
 
73
73
  [:python_version >= "3.9"]
74
+ pip>=25.1
74
75
  websockets>=15.0.1
75
76
  filelock>=3.18.0
76
77
  platformdirs>=4.3.7
@@ -147,13 +147,14 @@ setup(
147
147
  ],
148
148
  python_requires=">=3.8",
149
149
  install_requires=[
150
- 'pip>=25.0.1',
150
+ 'pip>=25.0.1;python_version<"3.9"',
151
+ 'pip>=25.1;python_version>="3.9"',
151
152
  'packaging>=25.0',
152
153
  'setuptools~=70.2;python_version<"3.10"', # Newer ones had issues
153
- 'setuptools>=79.0.1;python_version>="3.10"',
154
+ 'setuptools>=80.0.0;python_version>="3.10"',
154
155
  'wheel>=0.45.1',
155
156
  'attrs>=25.3.0',
156
- "certifi>=2025.1.31",
157
+ "certifi>=2025.4.26",
157
158
  "exceptiongroup>=1.2.2",
158
159
  'websockets~=13.1;python_version<"3.9"',
159
160
  'websockets>=15.0.1;python_version>="3.9"',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes