My problem is chromedriver 78 (currently the latest) doesn't work with Chrome 77. Ubuntu still has 77 in the apt-get repo for google-chrome-stable. My regression script automatically pulls down the latest available chromedriver (unless you specifcally give it a version) which is currently 78. I want to add in some logic to my regression to check what version of Chrome is currently installed and automatically grab the appropriate chromedriver version. The regression has the ability to run on mac, linux or windows.
I have been trying to figure out how selenium (or the chromedriver) knows where the browser is installed. It seems to always just 'know'. Which would imply there is some way to automatically determine the location of the browser? If I had that, I would be able to call
--version. But I can't for the life of me, figure out how to determine where chrome is installed (programmatically, anyway).
Is there a way to programmatically determine what the chrome version is for a given OS?