NoSuchDriverException(f"Unable to locate or obtain driver for {options.capabilities['browserName']}") selenium.common.exceptions.NoSuchDriverException: Message: Unable to locate or obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
AS-IS
chrome_ver = chromedriver_autoinstaller.get_chrome_version().split('.')[0]
service = Service(f'{chrome_ver}/chromedriver')
try:
driver = webdriver.Chrome(service=service, options=options)
except:
driver = webdriver.Chrome(service=service, options=options)
sendExceptionMail(title='크롬 드라이브 업데이트', content='test')
TO-BE
driver = webdriver.Chrome( options=options)
driver = webdriver.Chrome(options=options)
크롬 드라이버 파일이 있는 경로를 지정해 주지 않아도 실행 될 수 있도록 바뀜
https://stackoverflow.com/questions/76461596/unable-to-use-selenium-webdriver-getting-two-exceptions