Jeff Carpenter
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
4 deletions
-
deletefb/tools/chrome_driver.py
|
@ -60,9 +60,12 @@ def extract_zip(filename, chrome_maj_version): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setup_selenium(options, chrome_binary_path): |
|
|
def setup_selenium(options, chrome_binary_path): |
|
|
|
|
|
try: |
|
|
|
|
|
# try letting Selenium find the driver (in PATH) |
|
|
|
|
|
return webdriver.Chrome(options=options) |
|
|
|
|
|
except WebDriverException: |
|
|
# Configures selenium to use a custom path |
|
|
# Configures selenium to use a custom path |
|
|
driver_path = get_webdriver(chrome_binary_path) |
|
|
driver_path = get_webdriver(chrome_binary_path) |
|
|
|
|
|
|
|
|
return webdriver.Chrome(executable_path=driver_path, options=options) |
|
|
return webdriver.Chrome(executable_path=driver_path, options=options) |
|
|
|
|
|
|
|
|
def parse_version(output): |
|
|
def parse_version(output): |
|
|