I've been attempting to use the selenium webdriver with Google Chrome. I have installed chromedriver, and set the path to it. This has been done correctly as when I run chromedriver in terminal I get the output
Starting ChromeDriver 2.38.552518 on port 9515 Only local connections are allowed
However, when I attempt to use the chromedriver on my python script:
from selenium import webdriver driver = webdriver.Chrome()
I get this following error:
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver': 'chromedriver'
I've tried multiple methods of specifying the direct path and also putting the chromedriver file in the folder the python script is in. But nothing seems to be working and they all give the same error!
Please Help!
edit:
Path has been set in bash profile as such:
export PATH="~/drivers/:${PATH}"
Attempted Path specified in the python script as such:
driver = webdriver.Chrome("~/drivers/chromedriver")
Still with the same error of:
No such file or directory: '~/drivers/chromedriver': '~/drivers/chromedriver'
export PATH=$PATH:/place/with/the/file
without the curly braces and the quotes~
is user home folder, only Linux Shell know it represents user home folder.