Optimizations for driver downloads
- Make performance optimizations for driver downloads
- This resolves #1341
- If
chromedriveris missing when a test starts, SeleniumBase should first try getting the latest stable version. (Currently gets the special2.44version, which doesn't have the compatibility check.) This won't effectsbase get chromedriver, which will use the compatibility version. (Change that withsbase get chromedriver latestto get the latest version.) - If the version of
chromedriveris incompatible with the version ofchrome, try to parse the exact major version ofchromedriverthat's needed, based on the output of the exception message, and then download that specific version directly. (Currently, it first downloads the compatibility version ofchromedriver(2.44), and then looks atdriver.capabilitiesto figure out what the current version of Chrome is, in order to extract the major chrome version from that for downloading the correct driver version. - If running tests with multiple processes (eg.
-n=4) and a new driver needs to be downloaded, then have a single test download the new driver (which is shared by all) while the other tests wait. (Currently, this was only done forchromedriver. Nowmsedgedriverandgeckodriverwill have this too, as opposed to just failing if the situation arises.) - The new compatibility version of
chromedriverwill be changed to72.0.3626.69because that seems to be the highest version that doesn't include a version check with the Chrome version. (Currently it's set to2.44, which also doesn't have a version check, but it's slightly older.) Afterchromedriver72.0.3626.69, drivers became very restrictive on which Chrome versions could be paired with them. (Eg.This version of ChromeDriver only supports Chrome version ...)