webdriver_manager icon indicating copy to clipboard operation
webdriver_manager copied to clipboard

when setting chrome_type=CHROMIUM the wrong driver url is returned

Open rmeyer1 opened this issue 6 years ago • 1 comments

def before_scenario(context, scenario): logging.info("RUNNING: " + scenario.name) print("Browser Test starting.\n") print("Setting chromedriver version and chrome options. ")

abs_path = get_project_root()
downloads_path = os.path.join(abs_path, 'downloads')

options = Options()
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
prefs = {"download.default_directory": downloads_path}
options.add_experimental_option("prefs", prefs)
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)

if 'headless' in os.environ and os.environ['headless'] == '1':
    options.headless = True
    options.add_argument("--window-size=1920,1080")

**context.driver = webdriver.Chrome(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install(), chrome_options=options)**
print("Currently using Chromedriver Version " + context.driver.capabilities['chrome']['chromedriverVersion'])

context.driver.maximize_window()

below is the debugger output: Setting chromedriver version and chrome options.
[WDM] - Current chromium version is 85.0.4173 [WDM] - Get LATEST driver version for 85.0.4173

HOOK-ERROR in before_scenario: ValueError: There is no such driver by url http://chromedriver.storage.googleapis.com/LATEST_RELEASE_85.0.4173

there appears to be no release matching 85.0.4173 however, there is a release for 84.0.4173

rmeyer1 avatar Jun 18 '20 20:06 rmeyer1

There is mismatch between versions, 84 driver for 85 browser. It’s impossible to map this automatically. Put the version implicitly ChromeDriverManager(version=‘84.0.4173’).install()

SergeyPirogov avatar Jun 19 '20 05:06 SergeyPirogov