check for ubuntu package chromedriver path and use it if available.

Signed-off-by: Me <corbolais@gmail.com>
This commit is contained in:
Me 2018-03-11 23:22:41 +01:00
parent 74da2f0d97
commit a1d0f16ab0

View File

@ -56,8 +56,10 @@ def fetch_activation_bytes(username, password, options):
else:
if sys.platform == 'win32':
chromedriver_path = "chromedriver.exe"
else:
elif os.path.isfile("/usr/lib/chromium-browser/chromedriver"): # Ubuntu package chromedriver path
chromedriver_path = "/usr/lib/chromium-browser/chromedriver"
else:
chromedriver_path = "./chromedriver"
driver = webdriver.Chrome(chrome_options=opts,
executable_path=chromedriver_path)