seleniumbase 4.43.2__tar.gz → 4.43.3__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.

Potentially problematic release.


This version of seleniumbase might be problematic. Click here for more details.

Files changed (161) hide show
  1. {seleniumbase-4.43.2/seleniumbase.egg-info → seleniumbase-4.43.3}/PKG-INFO +5 -1
  2. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/README.md +4 -0
  3. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/pyproject.toml +4 -0
  4. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/__version__.py +1 -1
  5. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/browser_launcher.py +68 -4
  6. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/detect_b_ver.py +1 -1
  7. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/sb_cdp.py +51 -21
  8. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/constants.py +18 -0
  9. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/js_utils.py +2 -2
  10. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/driver_manager.py +114 -0
  11. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/pytest_plugin.py +125 -2
  12. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/sb_manager.py +118 -1
  13. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/selenium_plugin.py +123 -0
  14. seleniumbase-4.43.3/seleniumbase/resources/__init__.py +0 -0
  15. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/cdp_util.py +14 -0
  16. seleniumbase-4.43.3/seleniumbase/utilities/__init__.py +0 -0
  17. seleniumbase-4.43.3/seleniumbase/utilities/selenium_grid/__init__.py +0 -0
  18. seleniumbase-4.43.3/seleniumbase/utilities/selenium_ide/__init__.py +0 -0
  19. {seleniumbase-4.43.2 → seleniumbase-4.43.3/seleniumbase.egg-info}/PKG-INFO +5 -1
  20. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase.egg-info/SOURCES.txt +4 -0
  21. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/setup.py +4 -0
  22. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/.gitignore +0 -0
  23. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/LICENSE +0 -0
  24. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/MANIFEST.in +0 -0
  25. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/install.sh +0 -0
  26. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/pytest.ini +0 -0
  27. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/requirements.txt +0 -0
  28. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/sbase/__init__.py +0 -0
  29. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/sbase/__main__.py +0 -0
  30. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/sbase/steps.py +0 -0
  31. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/__init__.py +0 -0
  32. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/__main__.py +0 -0
  33. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/behave/__init__.py +0 -0
  34. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/behave/behave_helper.py +0 -0
  35. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/behave/behave_sb.py +0 -0
  36. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/behave/steps.py +0 -0
  37. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/common/__init__.py +0 -0
  38. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/common/decorators.py +0 -0
  39. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/common/encryption.py +0 -0
  40. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/common/exceptions.py +0 -0
  41. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/common/obfuscate.py +0 -0
  42. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/common/unobfuscate.py +0 -0
  43. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/config/__init__.py +0 -0
  44. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/config/ad_block_list.py +0 -0
  45. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/config/proxy_list.py +0 -0
  46. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/config/settings.py +0 -0
  47. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/__init__.py +0 -0
  48. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/logo_helper.py +0 -0
  49. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/rich_helper.py +0 -0
  50. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/run.py +0 -0
  51. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_behave_gui.py +0 -0
  52. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_caseplans.py +0 -0
  53. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_commander.py +0 -0
  54. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_install.py +0 -0
  55. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_mkchart.py +0 -0
  56. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_mkdir.py +0 -0
  57. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_mkfile.py +0 -0
  58. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_mkpres.py +0 -0
  59. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_mkrec.py +0 -0
  60. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_objectify.py +0 -0
  61. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_print.py +0 -0
  62. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/console_scripts/sb_recorder.py +0 -0
  63. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/__init__.py +0 -0
  64. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/application_manager.py +0 -0
  65. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/capabilities_parser.py +0 -0
  66. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/colored_traceback.py +0 -0
  67. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/create_db_tables.sql +0 -0
  68. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/download_helper.py +0 -0
  69. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/encoded_images.py +0 -0
  70. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/jqc_helper.py +0 -0
  71. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/log_helper.py +0 -0
  72. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/mysql.py +0 -0
  73. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/proxy_helper.py +0 -0
  74. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/recorder_helper.py +0 -0
  75. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/report_helper.py +0 -0
  76. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/s3_manager.py +0 -0
  77. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/sb_driver.py +0 -0
  78. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/session_helper.py +0 -0
  79. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/settings_parser.py +0 -0
  80. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/style_sheet.py +0 -0
  81. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/testcase_manager.py +0 -0
  82. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/tour_helper.py +0 -0
  83. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/core/visual_helper.py +0 -0
  84. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/drivers/__init__.py +0 -0
  85. {seleniumbase-4.43.2/seleniumbase/drivers/cft_drivers → seleniumbase-4.43.3/seleniumbase/drivers/atlas_drivers}/__init__.py +0 -0
  86. {seleniumbase-4.43.2/seleniumbase/drivers/chs_drivers → seleniumbase-4.43.3/seleniumbase/drivers/brave_drivers}/__init__.py +0 -0
  87. {seleniumbase-4.43.2/seleniumbase/extensions → seleniumbase-4.43.3/seleniumbase/drivers/cft_drivers}/__init__.py +0 -0
  88. {seleniumbase-4.43.2/seleniumbase/fixtures → seleniumbase-4.43.3/seleniumbase/drivers/chs_drivers}/__init__.py +0 -0
  89. {seleniumbase-4.43.2/seleniumbase/js_code → seleniumbase-4.43.3/seleniumbase/drivers/comet_drivers}/__init__.py +0 -0
  90. {seleniumbase-4.43.2/seleniumbase/masterqa → seleniumbase-4.43.3/seleniumbase/drivers/opera_drivers}/__init__.py +0 -0
  91. {seleniumbase-4.43.2/seleniumbase/plugins → seleniumbase-4.43.3/seleniumbase/extensions}/__init__.py +0 -0
  92. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/extensions/ad_block.zip +0 -0
  93. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/extensions/disable_csp.zip +0 -0
  94. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/extensions/recorder.zip +0 -0
  95. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/extensions/sbase_ext.zip +0 -0
  96. {seleniumbase-4.43.2/seleniumbase/resources → seleniumbase-4.43.3/seleniumbase/fixtures}/__init__.py +0 -0
  97. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/base_case.py +0 -0
  98. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/css_to_xpath.py +0 -0
  99. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/errors.py +0 -0
  100. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/page_actions.py +0 -0
  101. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/page_utils.py +0 -0
  102. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/shared_utils.py +0 -0
  103. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/unittest_helper.py +0 -0
  104. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/words.py +0 -0
  105. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/fixtures/xpath_to_css.py +0 -0
  106. {seleniumbase-4.43.2/seleniumbase/utilities → seleniumbase-4.43.3/seleniumbase/js_code}/__init__.py +0 -0
  107. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/js_code/active_css_js.py +0 -0
  108. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/js_code/live_js.py +0 -0
  109. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/js_code/recorder_js.py +0 -0
  110. {seleniumbase-4.43.2/seleniumbase/utilities/selenium_grid → seleniumbase-4.43.3/seleniumbase/masterqa}/__init__.py +0 -0
  111. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/masterqa/master_qa.py +0 -0
  112. {seleniumbase-4.43.2/seleniumbase/utilities/selenium_ide → seleniumbase-4.43.3/seleniumbase/plugins}/__init__.py +0 -0
  113. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/base_plugin.py +0 -0
  114. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/basic_test_info.py +0 -0
  115. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/db_reporting_plugin.py +0 -0
  116. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/page_source.py +0 -0
  117. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/s3_logging_plugin.py +0 -0
  118. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/plugins/screen_shots.py +0 -0
  119. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/__init__.py +0 -0
  120. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/chinese.py +0 -0
  121. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/dutch.py +0 -0
  122. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/french.py +0 -0
  123. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/italian.py +0 -0
  124. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/japanese.py +0 -0
  125. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/korean.py +0 -0
  126. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/master_dict.py +0 -0
  127. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/portuguese.py +0 -0
  128. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/russian.py +0 -0
  129. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/spanish.py +0 -0
  130. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/translate/translator.py +0 -0
  131. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/__init__.py +0 -0
  132. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp.py +0 -0
  133. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/__init__.py +0 -0
  134. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/_contradict.py +0 -0
  135. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/browser.py +0 -0
  136. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/config.py +0 -0
  137. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/connection.py +0 -0
  138. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/element.py +0 -0
  139. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/cdp_driver/tab.py +0 -0
  140. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/dprocess.py +0 -0
  141. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/options.py +0 -0
  142. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/patcher.py +0 -0
  143. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/reactor.py +0 -0
  144. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/undetected/webelement.py +0 -0
  145. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/download_selenium_server.py +0 -0
  146. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/font_color +0 -0
  147. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/grid-hub +0 -0
  148. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/grid-node +0 -0
  149. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/grid_hub.py +0 -0
  150. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/grid_node.py +0 -0
  151. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/register-grid-node.bat +0 -0
  152. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/register-grid-node.sh +0 -0
  153. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat +0 -0
  154. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh +0 -0
  155. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase/utilities/selenium_ide/convert_ide.py +0 -0
  156. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase.egg-info/dependency_links.txt +0 -0
  157. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase.egg-info/entry_points.txt +0 -0
  158. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase.egg-info/requires.txt +0 -0
  159. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/seleniumbase.egg-info/top_level.txt +0 -0
  160. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/setup.cfg +0 -0
  161. {seleniumbase-4.43.2 → seleniumbase-4.43.3}/virtualenv_install.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.43.2
3
+ Version: 4.43.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
@@ -871,6 +871,10 @@ pytest test_coffee_cart.py --trace
871
871
  --edge # (Shortcut for "--browser=edge".)
872
872
  --firefox # (Shortcut for "--browser=firefox".)
873
873
  --safari # (Shortcut for "--browser=safari".)
874
+ --opera # (Shortcut for "--browser=opera".)
875
+ --brave # (Shortcut for "--browser=brave".)
876
+ --comet # (Shortcut for "--browser=comet".)
877
+ --atlas # (Shortcut for "--browser=atlas".)
874
878
  --settings-file=FILE # (Override default SeleniumBase settings.)
875
879
  --env=ENV # (Set the test env. Access with "self.env" in tests.)
876
880
  --account=STR # (Set account. Access with "self.account" in tests.)
@@ -652,6 +652,10 @@ pytest test_coffee_cart.py --trace
652
652
  --edge # (Shortcut for "--browser=edge".)
653
653
  --firefox # (Shortcut for "--browser=firefox".)
654
654
  --safari # (Shortcut for "--browser=safari".)
655
+ --opera # (Shortcut for "--browser=opera".)
656
+ --brave # (Shortcut for "--browser=brave".)
657
+ --comet # (Shortcut for "--browser=comet".)
658
+ --atlas # (Shortcut for "--browser=atlas".)
655
659
  --settings-file=FILE # (Override default SeleniumBase settings.)
656
660
  --env=ENV # (Set the test env. Access with "self.env" in tests.)
657
661
  --account=STR # (Set account. Access with "self.account" in tests.)
@@ -43,6 +43,10 @@ packages = [
43
43
  "seleniumbase.drivers",
44
44
  "seleniumbase.drivers.cft_drivers",
45
45
  "seleniumbase.drivers.chs_drivers",
46
+ "seleniumbase.drivers.opera_drivers",
47
+ "seleniumbase.drivers.brave_drivers",
48
+ "seleniumbase.drivers.comet_drivers",
49
+ "seleniumbase.drivers.atlas_drivers",
46
50
  "seleniumbase.extensions",
47
51
  "seleniumbase.fixtures",
48
52
  "seleniumbase.js_code",
@@ -1,2 +1,2 @@
1
1
  # seleniumbase package
2
- __version__ = "4.43.2"
2
+ __version__ = "4.43.3"
@@ -28,6 +28,10 @@ from seleniumbase import decorators
28
28
  from seleniumbase import drivers # webdriver storage folder for SeleniumBase
29
29
  from seleniumbase.drivers import cft_drivers # chrome-for-testing
30
30
  from seleniumbase.drivers import chs_drivers # chrome-headless-shell
31
+ from seleniumbase.drivers import opera_drivers # still uses chromedriver
32
+ from seleniumbase.drivers import brave_drivers # still uses chromedriver
33
+ from seleniumbase.drivers import comet_drivers # still uses chromedriver
34
+ from seleniumbase.drivers import atlas_drivers # still uses chromedriver
31
35
  from seleniumbase import extensions # browser extensions storage folder
32
36
  from seleniumbase.config import settings
33
37
  from seleniumbase.core import detect_b_ver
@@ -44,6 +48,10 @@ urllib3.disable_warnings()
44
48
  DRIVER_DIR = os.path.dirname(os.path.realpath(drivers.__file__))
45
49
  DRIVER_DIR_CFT = os.path.dirname(os.path.realpath(cft_drivers.__file__))
46
50
  DRIVER_DIR_CHS = os.path.dirname(os.path.realpath(chs_drivers.__file__))
51
+ DRIVER_DIR_OPERA = os.path.dirname(os.path.realpath(opera_drivers.__file__))
52
+ DRIVER_DIR_BRAVE = os.path.dirname(os.path.realpath(brave_drivers.__file__))
53
+ DRIVER_DIR_COMET = os.path.dirname(os.path.realpath(comet_drivers.__file__))
54
+ DRIVER_DIR_ATLAS = os.path.dirname(os.path.realpath(atlas_drivers.__file__))
47
55
  # Make sure that the SeleniumBase DRIVER_DIR is at the top of the System PATH
48
56
  # (Changes to the System PATH with os.environ only last during the test run)
49
57
  if not os.environ["PATH"].startswith(DRIVER_DIR):
@@ -1218,8 +1226,8 @@ def uc_gui_click_x_y(driver, x, y, timeframe=0.25):
1218
1226
  driver.cdp.minimize()
1219
1227
  driver.cdp.set_window_rect(win_x, win_y, width, height)
1220
1228
  if IS_WINDOWS:
1221
- x = x * width_ratio
1222
- y = y * width_ratio
1229
+ x = x * (width_ratio + 0.03)
1230
+ y = y * (width_ratio - 0.03)
1223
1231
  _uc_gui_click_x_y(driver, x, y, timeframe=timeframe, uc_lock=False)
1224
1232
  return
1225
1233
  with suppress(Exception):
@@ -1260,7 +1268,7 @@ def _uc_gui_click_captcha(
1260
1268
  ctype=None,
1261
1269
  ):
1262
1270
  cdp_mode_on_at_start = __is_cdp_swap_needed(driver)
1263
- if cdp_mode_on_at_start and (not ctype or ctype == "cf_t"):
1271
+ if cdp_mode_on_at_start:
1264
1272
  return driver.cdp.gui_click_captcha()
1265
1273
  _on_a_captcha_page = None
1266
1274
  if ctype == "cf_t":
@@ -1952,6 +1960,15 @@ def get_valid_binary_names_for_browser(browser):
1952
1960
  raise Exception("Invalid combination for OS browser binaries!")
1953
1961
 
1954
1962
 
1963
+ def _special_binary_exists(location, name):
1964
+ filename = str(location).split("/")[-1].split("\\")[-1]
1965
+ return (
1966
+ location
1967
+ and str(name).lower() in filename.lower()
1968
+ and os.path.exists(location)
1969
+ )
1970
+
1971
+
1955
1972
  def _repair_chromedriver(chrome_options, headless_options, mcv=None):
1956
1973
  if mcv:
1957
1974
  subprocess.check_call(
@@ -2960,6 +2977,14 @@ def get_driver(
2960
2977
  and sb_config.binary_location == "chs"
2961
2978
  ):
2962
2979
  driver_dir = DRIVER_DIR_CHS
2980
+ if _special_binary_exists(binary_location, "opera"):
2981
+ driver_dir = DRIVER_DIR_OPERA
2982
+ if _special_binary_exists(binary_location, "brave"):
2983
+ driver_dir = DRIVER_DIR_BRAVE
2984
+ if _special_binary_exists(binary_location, "comet"):
2985
+ driver_dir = DRIVER_DIR_COMET
2986
+ if _special_binary_exists(binary_location, "atlas"):
2987
+ driver_dir = DRIVER_DIR_ATLAS
2963
2988
  if (
2964
2989
  hasattr(sb_config, "settings")
2965
2990
  and hasattr(sb_config.settings, "NEW_DRIVER_DIR")
@@ -3919,6 +3944,18 @@ def get_local_driver(
3919
3944
  ):
3920
3945
  special_chrome = True
3921
3946
  driver_dir = DRIVER_DIR_CHS
3947
+ if _special_binary_exists(binary_location, "opera"):
3948
+ special_chrome = True
3949
+ driver_dir = DRIVER_DIR_OPERA
3950
+ if _special_binary_exists(binary_location, "brave"):
3951
+ special_chrome = True
3952
+ driver_dir = DRIVER_DIR_BRAVE
3953
+ if _special_binary_exists(binary_location, "comet"):
3954
+ special_chrome = True
3955
+ driver_dir = DRIVER_DIR_COMET
3956
+ if _special_binary_exists(binary_location, "atlas"):
3957
+ special_chrome = True
3958
+ driver_dir = DRIVER_DIR_ATLAS
3922
3959
  if (
3923
3960
  hasattr(sb_config, "settings")
3924
3961
  and hasattr(sb_config.settings, "NEW_DRIVER_DIR")
@@ -4756,6 +4793,27 @@ def get_local_driver(
4756
4793
  )
4757
4794
  return extend_driver(driver)
4758
4795
  elif browser_name == constants.Browser.GOOGLE_CHROME:
4796
+ set_chromium = None
4797
+ if _special_binary_exists(binary_location, "opera"):
4798
+ set_chromium = "opera"
4799
+ local_chromedriver = DRIVER_DIR_OPERA + "/chromedriver"
4800
+ if IS_WINDOWS:
4801
+ local_chromedriver = DRIVER_DIR_OPERA + "/chromedriver.exe"
4802
+ if _special_binary_exists(binary_location, "brave"):
4803
+ set_chromium = "brave"
4804
+ local_chromedriver = DRIVER_DIR_BRAVE + "/chromedriver"
4805
+ if IS_WINDOWS:
4806
+ local_chromedriver = DRIVER_DIR_BRAVE + "/chromedriver.exe"
4807
+ if _special_binary_exists(binary_location, "comet"):
4808
+ set_chromium = "comet"
4809
+ local_chromedriver = DRIVER_DIR_COMET + "/chromedriver"
4810
+ if IS_WINDOWS:
4811
+ local_chromedriver = DRIVER_DIR_COMET + "/chromedriver.exe"
4812
+ if _special_binary_exists(binary_location, "atlas"):
4813
+ set_chromium = "atlas"
4814
+ local_chromedriver = DRIVER_DIR_ATLAS + "/chromedriver"
4815
+ if IS_WINDOWS:
4816
+ local_chromedriver = DRIVER_DIR_ATLAS + "/chromedriver.exe"
4759
4817
  try:
4760
4818
  chrome_options = _set_chrome_options(
4761
4819
  browser_name,
@@ -4877,6 +4935,12 @@ def get_local_driver(
4877
4935
  major_chrome_version = None
4878
4936
  if major_chrome_version:
4879
4937
  use_version = major_chrome_version
4938
+ if (
4939
+ set_chromium == "opera"
4940
+ and use_version.isnumeric()
4941
+ and int(use_version) < 130
4942
+ ):
4943
+ use_version = "130" # Special case
4880
4944
  ch_driver_version = None
4881
4945
  path_chromedriver = chromedriver_on_path()
4882
4946
  if os.path.exists(local_chromedriver):
@@ -4894,7 +4958,7 @@ def get_local_driver(
4894
4958
  ch_driver_version = output
4895
4959
  if driver_version == "keep":
4896
4960
  driver_version = ch_driver_version
4897
- elif path_chromedriver:
4961
+ elif path_chromedriver and not set_chromium:
4898
4962
  try:
4899
4963
  make_driver_executable_if_not(path_chromedriver)
4900
4964
  except Exception as e:
@@ -282,7 +282,7 @@ def opera_on_windows_path(browser_type=None):
282
282
  "Opera/Application",
283
283
  ):
284
284
  try:
285
- candidates.append(os.sep.join((item, subitem, "launcher.exe")))
285
+ candidates.append(os.sep.join((item, subitem, "opera.exe")))
286
286
  except TypeError:
287
287
  pass
288
288
  for candidate in candidates:
@@ -1333,6 +1333,17 @@ class CDPMethods():
1333
1333
  x = window_rect["x"] + element_rect["x"]
1334
1334
  y = w_bottom_y - viewport_height + element_rect["y"]
1335
1335
  y_scroll_offset = window_rect["pageYOffset"]
1336
+ if (
1337
+ hasattr(sb_config, "_cdp_browser")
1338
+ and sb_config._cdp_browser == "opera"
1339
+ ):
1340
+ # Handle special case where Opera side panel shifts coordinates
1341
+ x_offset = window_rect["outerWidth"] - window_rect["innerWidth"]
1342
+ if x_offset > 56:
1343
+ x_offset = 56
1344
+ elif x_offset < 22:
1345
+ x_offset = 0
1346
+ x = x + x_offset
1336
1347
  y = y - y_scroll_offset
1337
1348
  x = x + window_rect["scrollX"]
1338
1349
  y = y + window_rect["scrollY"]
@@ -1674,11 +1685,6 @@ class CDPMethods():
1674
1685
  import pyautogui
1675
1686
  pyautogui = self.__get_configured_pyautogui(pyautogui)
1676
1687
  screen_width, screen_height = pyautogui.size()
1677
- if (
1678
- hasattr(sb_config, "_cdp_browser")
1679
- and sb_config._cdp_browser == "opera"
1680
- ):
1681
- x = x + 55
1682
1688
  if x < 0 or y < 0 or x > screen_width or y > screen_height:
1683
1689
  raise Exception(
1684
1690
  "PyAutoGUI cannot click on point (%s, %s)"
@@ -1731,8 +1737,8 @@ class CDPMethods():
1731
1737
  self.__add_light_pause()
1732
1738
  self.__set_window_rect(win_x, win_y, width, height)
1733
1739
  self.__add_light_pause()
1734
- x = x * width_ratio
1735
- y = y * width_ratio
1740
+ x = x * (width_ratio + 0.03)
1741
+ y = y * (width_ratio - 0.03)
1736
1742
  self.bring_active_window_to_front()
1737
1743
  self.__gui_click_x_y(x, y, timeframe=timeframe, uc_lock=False)
1738
1744
 
@@ -1760,8 +1766,43 @@ class CDPMethods():
1760
1766
  return True
1761
1767
  return False
1762
1768
 
1769
+ def _on_a_g_recaptcha_page(self):
1770
+ time.sleep(0.042)
1771
+ source = self.get_page_source()
1772
+ if not source or len(source) < 400:
1773
+ time.sleep(0.22)
1774
+ source = self.get_page_source()
1775
+ if (
1776
+ 'id="recaptcha-token"' in source
1777
+ or 'title="reCAPTCHA"' in source
1778
+ ):
1779
+ return True
1780
+ return False
1781
+
1782
+ def __gui_click_recaptcha(self):
1783
+ selector = None
1784
+ if self.is_element_visible('iframe[title="reCAPTCHA"]'):
1785
+ selector = 'iframe[title="reCAPTCHA"]'
1786
+ else:
1787
+ return
1788
+ with suppress(Exception):
1789
+ time.sleep(0.08)
1790
+ element_rect = self.get_gui_element_rect(selector, timeout=1)
1791
+ e_x = element_rect["x"]
1792
+ e_y = element_rect["y"]
1793
+ x = e_x + 29
1794
+ y = e_y + 35
1795
+ sb_config._saved_cf_x_y = (x, y)
1796
+ time.sleep(0.08)
1797
+ self.gui_click_x_y(x, y)
1798
+
1763
1799
  def gui_click_captcha(self):
1764
- if not self._on_a_cf_turnstile_page():
1800
+ if self._on_a_cf_turnstile_page():
1801
+ pass
1802
+ elif self._on_a_g_recaptcha_page():
1803
+ self.__gui_click_recaptcha()
1804
+ return
1805
+ else:
1765
1806
  return
1766
1807
  selector = None
1767
1808
  if (
@@ -1926,7 +1967,7 @@ class CDPMethods():
1926
1967
  if not shared_utils.is_windows():
1927
1968
  y = e_y + 32
1928
1969
  else:
1929
- y = e_y + 22
1970
+ y = e_y + 28
1930
1971
  sb_config._saved_cf_x_y = (x, y)
1931
1972
  time.sleep(0.08)
1932
1973
  self.gui_click_x_y(x, y)
@@ -1936,12 +1977,6 @@ class CDPMethods():
1936
1977
  import pyautogui
1937
1978
  pyautogui = self.__get_configured_pyautogui(pyautogui)
1938
1979
  screen_width, screen_height = pyautogui.size()
1939
- if (
1940
- hasattr(sb_config, "_cdp_browser")
1941
- and sb_config._cdp_browser == "opera"
1942
- ):
1943
- x1 = x1 + 55
1944
- x2 = x2 + 55
1945
1980
  if x1 < 0 or y1 < 0 or x1 > screen_width or y1 > screen_height:
1946
1981
  raise Exception(
1947
1982
  "PyAutoGUI cannot drag-drop from point (%s, %s)"
@@ -2033,11 +2068,6 @@ class CDPMethods():
2033
2068
  import pyautogui
2034
2069
  pyautogui = self.__get_configured_pyautogui(pyautogui)
2035
2070
  screen_width, screen_height = pyautogui.size()
2036
- if (
2037
- hasattr(sb_config, "_cdp_browser")
2038
- and sb_config._cdp_browser == "opera"
2039
- ):
2040
- x = x + 55
2041
2071
  if x < 0 or y < 0 or x > screen_width or y > screen_height:
2042
2072
  raise Exception(
2043
2073
  "PyAutoGUI cannot hover on point (%s, %s)"
@@ -2118,7 +2148,7 @@ class CDPMethods():
2118
2148
  if width > 0 and height > 0:
2119
2149
  x, y = self.get_gui_element_center(selector)
2120
2150
  self.bring_active_window_to_front()
2121
- self.__gui_hover_x_y(x, y, timeframe=timeframe)
2151
+ self.__gui_hover_x_y(x, y, timeframe=timeframe, uc_lock=False)
2122
2152
  self.__slow_mode_pause_if_set()
2123
2153
  self.loop.run_until_complete(self.page.wait())
2124
2154
 
@@ -387,6 +387,20 @@ class ValidBrowsers:
387
387
  "ie",
388
388
  "safari",
389
389
  "remote",
390
+ "opera",
391
+ "brave",
392
+ "comet",
393
+ "atlas",
394
+ ]
395
+
396
+
397
+ class ChromiumSubs:
398
+ # Chromium browsers that still use chromedriver
399
+ chromium_subs = [
400
+ "opera",
401
+ "brave",
402
+ "comet",
403
+ "atlas",
390
404
  ]
391
405
 
392
406
 
@@ -430,8 +444,12 @@ class ValidBinaries:
430
444
  "Google Chrome Beta",
431
445
  "Google Chrome Dev",
432
446
  "Brave Browser",
447
+ "Brave",
448
+ "Opera Browser",
433
449
  "Opera",
450
+ "Comet Browser",
434
451
  "Comet",
452
+ "Atlas Browser",
435
453
  "Atlas",
436
454
  ]
437
455
  valid_edge_binaries_on_macos = [
@@ -1278,7 +1278,7 @@ def scroll_to_element(driver, element):
1278
1278
  try:
1279
1279
  screen_width = driver.get_window_size()["width"]
1280
1280
  except Exception:
1281
- screen_width = execute_script("return window.innerWidth;")
1281
+ screen_width = execute_script(driver, "return window.innerWidth;")
1282
1282
  element_location_y = element_location_y - constants.Scroll.Y_OFFSET
1283
1283
  if element_location_y < 0:
1284
1284
  element_location_y = 0
@@ -1327,7 +1327,7 @@ def slow_scroll_to_element(driver, element, *args, **kwargs):
1327
1327
  try:
1328
1328
  screen_width = driver.get_window_size()["width"]
1329
1329
  except Exception:
1330
- screen_width = execute_script("return window.innerWidth;")
1330
+ screen_width = execute_script(driver, "return window.innerWidth;")
1331
1331
  element_location_y = element_location_y - constants.Scroll.Y_OFFSET
1332
1332
  if element_location_y < 0:
1333
1333
  element_location_y = 0
@@ -239,6 +239,7 @@ def Driver(
239
239
  from seleniumbase import config as sb_config
240
240
  from seleniumbase.config import settings
241
241
  from seleniumbase.core import browser_launcher
242
+ from seleniumbase.core import detect_b_ver
242
243
  from seleniumbase.fixtures import constants
243
244
  from seleniumbase.fixtures import shared_utils
244
245
 
@@ -271,10 +272,37 @@ def Driver(
271
272
  )
272
273
  elif existing_runner:
273
274
  sb_config._context_of_runner = True
275
+ sb_config._browser_shortcut = None
276
+ sb_config._cdp_browser = None
277
+ sb_config._cdp_bin_loc = None
274
278
  browser_changes = 0
275
279
  browser_set = None
276
280
  browser_text = None
277
281
  browser_list = []
282
+ # Check if binary-location in options
283
+ bin_loc_in_options = False
284
+ if (
285
+ binary_location
286
+ and len(str(binary_location)) > 5
287
+ and os.path.exists(str(binary_location))
288
+ ):
289
+ bin_loc_in_options = True
290
+ else:
291
+ for arg in sys_argv:
292
+ if arg in ["--binary-location", "--binary_location", "--bl"]:
293
+ bin_loc_in_options = True
294
+ if (
295
+ browser
296
+ and browser in constants.ChromiumSubs.chromium_subs
297
+ and not bin_loc_in_options
298
+ ):
299
+ bin_loc = detect_b_ver.get_binary_location(browser)
300
+ if bin_loc and os.path.exists(bin_loc):
301
+ if browser in bin_loc.lower().split("/")[-1].split("\\")[-1]:
302
+ sb_config._cdp_browser = browser
303
+ sb_config._cdp_bin_loc = bin_loc
304
+ binary_location = bin_loc
305
+ bin_loc_in_options = True
278
306
  # As a shortcut, you can use "--edge" instead of "--browser=edge", etc,
279
307
  # but you can only specify one default browser for tests. (Default: chrome)
280
308
  if "--browser=chrome" in sys_argv or "--browser chrome" in sys_argv:
@@ -301,6 +329,46 @@ def Driver(
301
329
  browser_changes += 1
302
330
  browser_set = "remote"
303
331
  browser_list.append("--browser=remote")
332
+ if "--browser=opera" in sys_argv or "--browser opera" in sys_argv:
333
+ if not bin_loc_in_options:
334
+ bin_loc = detect_b_ver.get_binary_location("opera")
335
+ if os.path.exists(bin_loc):
336
+ browser_changes += 1
337
+ browser_set = "opera"
338
+ sb_config._browser_shortcut = "opera"
339
+ sb_config._cdp_browser = "opera"
340
+ sb_config._cdp_bin_loc = bin_loc
341
+ browser_list.append("--browser=opera")
342
+ if "--browser=brave" in sys_argv or "--browser brave" in sys_argv:
343
+ if not bin_loc_in_options:
344
+ bin_loc = detect_b_ver.get_binary_location("brave")
345
+ if os.path.exists(bin_loc):
346
+ browser_changes += 1
347
+ browser_set = "brave"
348
+ sb_config._browser_shortcut = "brave"
349
+ sb_config._cdp_browser = "brave"
350
+ sb_config._cdp_bin_loc = bin_loc
351
+ browser_list.append("--browser=brave")
352
+ if "--browser=comet" in sys_argv or "--browser comet" in sys_argv:
353
+ if not bin_loc_in_options:
354
+ bin_loc = detect_b_ver.get_binary_location("comet")
355
+ if os.path.exists(bin_loc):
356
+ browser_changes += 1
357
+ browser_set = "comet"
358
+ sb_config._browser_shortcut = "comet"
359
+ sb_config._cdp_browser = "comet"
360
+ sb_config._cdp_bin_loc = bin_loc
361
+ browser_list.append("--browser=comet")
362
+ if "--browser=atlas" in sys_argv or "--browser atlas" in sys_argv:
363
+ if not bin_loc_in_options:
364
+ bin_loc = detect_b_ver.get_binary_location("atlas")
365
+ if os.path.exists(bin_loc):
366
+ browser_changes += 1
367
+ browser_set = "atlas"
368
+ sb_config._browser_shortcut = "atlas"
369
+ sb_config._cdp_browser = "atlas"
370
+ sb_config._cdp_bin_loc = bin_loc
371
+ browser_list.append("--browser=atlas")
304
372
  browser_text = browser_set
305
373
  if "--chrome" in sys_argv and not browser_set == "chrome":
306
374
  browser_changes += 1
@@ -322,6 +390,46 @@ def Driver(
322
390
  browser_changes += 1
323
391
  browser_text = "safari"
324
392
  browser_list.append("--safari")
393
+ if "--opera" in sys_argv and not browser_set == "opera":
394
+ if not bin_loc_in_options:
395
+ bin_loc = detect_b_ver.get_binary_location("opera")
396
+ if os.path.exists(bin_loc):
397
+ browser_changes += 1
398
+ browser_text = "opera"
399
+ sb_config._browser_shortcut = "opera"
400
+ sb_config._cdp_browser = "opera"
401
+ sb_config._cdp_bin_loc = bin_loc
402
+ browser_list.append("--opera")
403
+ if "--brave" in sys_argv and not browser_set == "brave":
404
+ if not bin_loc_in_options:
405
+ bin_loc = detect_b_ver.get_binary_location("brave")
406
+ if os.path.exists(bin_loc):
407
+ browser_changes += 1
408
+ browser_text = "brave"
409
+ sb_config._browser_shortcut = "brave"
410
+ sb_config._cdp_browser = "brave"
411
+ sb_config._cdp_bin_loc = bin_loc
412
+ browser_list.append("--brave")
413
+ if "--comet" in sys_argv and not browser_set == "comet":
414
+ if not bin_loc_in_options:
415
+ bin_loc = detect_b_ver.get_binary_location("comet")
416
+ if os.path.exists(bin_loc):
417
+ browser_changes += 1
418
+ browser_text = "comet"
419
+ sb_config._browser_shortcut = "comet"
420
+ sb_config._cdp_browser = "comet"
421
+ sb_config._cdp_bin_loc = bin_loc
422
+ browser_list.append("--comet")
423
+ if "--atlas" in sys_argv and not browser_set == "atlas":
424
+ if not bin_loc_in_options:
425
+ bin_loc = detect_b_ver.get_binary_location("atlas")
426
+ if os.path.exists(bin_loc):
427
+ browser_changes += 1
428
+ browser_text = "atlas"
429
+ sb_config._browser_shortcut = "atlas"
430
+ sb_config._cdp_browser = "atlas"
431
+ sb_config._cdp_bin_loc = bin_loc
432
+ browser_list.append("--atlas")
325
433
  if browser_changes > 1:
326
434
  message = "\n\n TOO MANY browser types were entered!"
327
435
  message += "\n There were %s found:\n > %s" % (
@@ -345,6 +453,10 @@ def Driver(
345
453
  "Browser: {%s} is not a valid browser option. "
346
454
  "Valid options = {%s}" % (browser, valid_browsers)
347
455
  )
456
+ if sb_config._browser_shortcut:
457
+ browser = sb_config._browser_shortcut
458
+ if browser in constants.ChromiumSubs.chromium_subs:
459
+ browser = "chrome" # Still uses chromedriver
348
460
  if headless is None:
349
461
  if "--headless" in sys_argv:
350
462
  headless = True
@@ -534,6 +646,8 @@ def Driver(
534
646
  count += 1
535
647
  user_agent = agent
536
648
  found_bl = None
649
+ if hasattr(sb_config, "_cdp_bin_loc") and sb_config._cdp_bin_loc:
650
+ binary_location = sb_config._cdp_bin_loc
537
651
  if binary_location is None and "--binary-location" in arg_join:
538
652
  count = 0
539
653
  for arg in sys_argv: