파이썬[python]

파이썬 셀레니움 'chromedriver' executable needs to be in PATH

xemaker 2022. 8. 16. 15:52
import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver=webdriver.Chrome()

셀레니움 테스트를 해보려고 위의 코드를 쳤더니

raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

이런 에러가 발생했다. 그래서 크롬드라이버가 있는 경로를 쳐서 해결하였다.

import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver=webdriver.Chrome("D:\python\selenium\chromedriver.exe")