Error message: “'chromedriver' executable needs to be available in the path”

前端 未结 25 2322
轻奢々
轻奢々 2020-11-22 05:15

I am using selenium with python and have downloaded the chromedriver for my windows computer from this site: http://chromedriver.storage.googleapis.com/index.html?path=2.15/

25条回答
  •  Happy的楠姐
    2020-11-22 05:52

    You can test if it actually is in the PATH, if you open a cmd and type in chromedriver (assuming your chromedriver executable is still named like this) and hit Enter. If Starting ChromeDriver 2.15.322448 is appearing, the PATH is set appropriately and there is something else going wrong.

    Alternatively you can use a direct path to the chromedriver like this:

     driver = webdriver.Chrome('/path/to/chromedriver') 
    

    So in your specific case:

     driver = webdriver.Chrome("C:/Users/michael/Downloads/chromedriver_win32/chromedriver.exe")
    

提交回复
热议问题