|
44 | 44 | from seleniumbase.fixtures import shared_utils |
45 | 45 | from seleniumbase import config as sb_config |
46 | 46 | from seleniumbase import drivers # webdriver storage folder for SeleniumBase |
| 47 | +from seleniumbase.drivers import cft_drivers # chrome-for-testing |
| 48 | +from seleniumbase.drivers import chs_drivers # chrome-headless-shell |
47 | 49 |
|
48 | 50 | urllib3.disable_warnings() |
49 | 51 | ARCH = platform.architecture()[0] |
|
52 | 54 | IS_LINUX = shared_utils.is_linux() |
53 | 55 | IS_WINDOWS = shared_utils.is_windows() |
54 | 56 | DRIVER_DIR = os.path.dirname(os.path.realpath(drivers.__file__)) |
| 57 | +DRIVER_DIR_CFT = os.path.dirname(os.path.realpath(cft_drivers.__file__)) |
| 58 | +DRIVER_DIR_CHS = os.path.dirname(os.path.realpath(chs_drivers.__file__)) |
55 | 59 | LOCAL_PATH = "/usr/local/bin/" # On Mac and Linux systems |
56 | 60 | DEFAULT_CHROMEDRIVER_VERSION = "114.0.5735.90" # (If can't find LATEST_STABLE) |
57 | 61 | DEFAULT_GECKODRIVER_VERSION = "v0.36.0" |
@@ -305,6 +309,17 @@ def main(override=None, intel_for_uc=None, force_uc=None): |
305 | 309 | headless_ie_exists = False |
306 | 310 | headless_ie_file_name = None |
307 | 311 | downloads_folder = DRIVER_DIR |
| 312 | + if ( |
| 313 | + hasattr(sb_config, "settings") |
| 314 | + and hasattr(sb_config.settings, "NEW_DRIVER_DIR") |
| 315 | + and sb_config.settings.NEW_DRIVER_DIR |
| 316 | + and os.path.exists(sb_config.settings.NEW_DRIVER_DIR) |
| 317 | + ): |
| 318 | + downloads_folder = sb_config.settings.NEW_DRIVER_DIR |
| 319 | + elif override == "cft" or name == "cft": |
| 320 | + downloads_folder = DRIVER_DIR_CFT |
| 321 | + elif override == "chs" or name == "chs": |
| 322 | + downloads_folder = DRIVER_DIR_CHS |
308 | 323 | expected_contents = None |
309 | 324 | platform_code = None |
310 | 325 | copy_to_path = False |
|
0 commit comments