With zipfile.ZipFile(file_path, 'r') as zip_ref: FancyURLopener()ĭriver_url = base_driver_url + get_chrome_version() + '/' + file_nameĪpp_path = os.path.dirname(os.path.realpath(_file_))Ĭhromedriver_path = app_path + '/' + driver_file_name
# Find the latest chromedriver, download, unzip, set permissions to executable.įile_name = 'chromedriver_' + get_platform_filename()ĭriver_file_name = 'chromedriver' + '.exe' if platform = 'win32' else '' Retry = is_download and download_driver( major_version) S_IEXEC)Įlif 'chromedriver' executable needs to be in PATH' in e. Print( 'Warning: You may need to update the Chrome web browser to the latest version. Chrome( options = options, executable_path = './chromedriver') Major_version = parts if len( parts) > 0 else 0ĭriver = webdriver. # Determine the version of Chrome installed. If it fails, download the latest chromedriver. # Attempt to open the Selenium chromedriver.
exceptions import WebDriverException, SessionNotCreatedException