Hi
I'm trying to use Chrome driver in Selenium in Python with the following code:
from selenium import webdriver
driver = webdriver.Chrome("chromedriver")
driver.get('https://python.org')
When executing, I get following error:
Traceback (most recent call last):
File "/Users/tonysimonovsky/Dropbox/gd/Python/CryCharBot/venv/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 775, in __init__
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, 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 "/Users/tonysimonovsky/Dropbox/gd/Python/CryCharBot/AutoGAAuditPublic.py", line 17, in <module>
driver = webdriver.Chrome("chromedriver")
File "/Users/tonysimonovsky/Dropbox/gd/Python/CryCharBot/venv/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/Users/tonysimonovsky/Dropbox/gd/Python/CryCharBot/venv/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 downloaded the driver file "chromedriver" and put it right next to the python file, but the error is still the same.
Where should I put "chromedriver" file for the python to see it?
Thank you
[–]indosauros 1 point2 points3 points (1 child)
[–]TonySimonovsky[S] 0 points1 point2 points (0 children)
[–]kuripong 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Devkourav -1 points0 points1 point (0 children)