The way the code is comparing versions is wrong and could cause error in systems with old versions of Chrome (in my case, the Chrome version that caused the problem was 91.0.4472.114). As the code is comparing strings rather than numbers the comparison "91" >= "115" gives True, when actually we should be comparing 91>=115 to get the False value.
The comparison:
get_major_version(chrome_version) >= "115"
should be changed to:
int(get_major_version(chrome_version)) >= 115
in the following lines:
|
if chrome_version is not None and get_major_version(chrome_version) >= "115": |
|
if chrome_version is not None and get_major_version(chrome_version) >= "115": |
|
if get_major_version(chrome_version) >= "115": |
The comparison:
get_major_version(chromedriver_version) >= "115"
should be changed to:
int(get_major_version(chromedriver_version)) >= 115
in line:
|
if get_major_version(chromedriver_version) >= "115": # new CfT ChromeDriver versions have their URLs published, so we already have a list of options |
And finally, the comparison:
should be changed to:
int(major_version) >= 115
in line:
|
if not chromedriver_version or (major_version >= "115" and not download_options): |
The way the code is comparing versions is wrong and could cause error in systems with old versions of Chrome (in my case, the Chrome version that caused the problem was 91.0.4472.114). As the code is comparing strings rather than numbers the comparison "91" >= "115" gives
True, when actually we should be comparing 91>=115 to get the False value.The comparison:
should be changed to:
in the following lines:
python-chromedriver-autoinstaller/chromedriver_autoinstaller/utils.py
Line 61 in cd9d195
python-chromedriver-autoinstaller/chromedriver_autoinstaller/utils.py
Line 70 in cd9d195
python-chromedriver-autoinstaller/chromedriver_autoinstaller/utils.py
Line 218 in cd9d195
The comparison:
should be changed to:
in line:
python-chromedriver-autoinstaller/chromedriver_autoinstaller/utils.py
Line 97 in cd9d195
And finally, the comparison:
should be changed to:
in line:
python-chromedriver-autoinstaller/chromedriver_autoinstaller/utils.py
Line 277 in cd9d195