Reputation: 310
I am trying to execute my Selenium Webdriver in python, but unable to go any further, I am running a basic script, like
from selenium import webdriver
driver = webdriver.Chrome
On which I am seeing this error.
Traceback (most recent call last):
File "/Users/new/PycharmProjects/Selenium/Staring/RunTest.py", line 4, in <module>
driver = webdriver.Chrome('/Users/new/PycharmProjects/Selenium/Starting/chromedriver.exe')
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 81, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Can someone please help or assist me.
Upvotes: 1
Views: 5854
Reputation:
You need to provide path for you chromedriver
from selenium import webdriver
driver = webdriver.Chrome('your/chromedriver/path')
You able to check where is your chromedriver
located via command.
which chromedriver
Upvotes: 1
Reputation: 83
Simply add chromedriver binary to your home folder Can be downloaded here https://chromedriver.storage.googleapis.com/index.html?path=2.33/
Upvotes: 0