I've tried many solutions that others provided on stackoverflow as well as other sites, nothing seems to be working and I have no idea what to do anymore.. This is what ive basically been doing:
from selenium import webdriver
# from chromedriver_py import binary_path
# driver = webdriver.Chrome(executable_path=binary_path)
driver = webdriver.Chrome('/usr/local/bin/chromedriver')
The error
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service /usr/local/bin/chromedriver
I've tried:
- adjusting my host file in etc/hosts
- using an os environ variable for the location of the chromedriver
- using chromedriver_py for the binary path
- Double checked that chromedriver version is the same as my chrome version
Not sure if this is relevant but im using:
- MacOs Sierra 10.12.6
- PyCharm 2019 CE