Fixed chrome driver download utility issue for Ubuntu. Fixes #4942

This commit is contained in:
Murtuza Zabuawala
2020-03-12 11:18:07 +05:30
committed by Akshay Joshi
parent 6586be5158
commit 7cc30e3216
2 changed files with 6 additions and 0 deletions

View File

@@ -102,6 +102,11 @@ def get_chrome_version(args):
print('The specified Chrome executable output an unexpected '
'version string: {}.'.format(version_str))
sys.exit(1)
# On some linux distro `chrome--version` gives output like
# 'Google Chrome 80.0.3987.132 unknown\n'
# so we need to check and remove the unknown string from the version
if version_str.endswith("unknown\n"):
version_str = version_str.strip("unknown\n").strip()
chrome_version = '.'.join(version_str.split()[-1].split('.')[:-1])