I have downloaded Selenium and Chromedriver on my MacOS, but cannot seem to execute on my IDLE Python Shell:
driver = webdriver.Chrome()
The error message returns:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1499, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver': 'chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
driver = webdriver.Chrome()
File
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
self.service.start()
File
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver'
executable needs to be in PATH. Please see
https://sites.google.com/a/chromium.org/chromedriver/home
I have attempted to set Chromedriver in the right path by placing it in usr/local/bin and putting it in the selenium folder in the image attached. However, I am not sure if it is in the right place because the same error still shows up.
How would I solve this?
Thank you so much!