에러 메세지
- 셀레니움 소스를 실행하니 아래와 같은 에러가 발생했다.
AttributeError: 'str' object has no attribute 'capabilities'
설명
셀레니움을 오랜만에 사용했는데 그새 또 문법이 바뀐 것 같다.
원래 소스
- chromedriver를 별도로 다운로드 받아서 exe 파일이 있는 주소값을 인수로 전달해줬다.
from selenium import webdriver
driver = webdriver.Chrome("c://chromedriver.exe")
업데이트 후의 소스
- 이제는 chromedriver를 별도로 다운로드할 필요가 없고 exe 파일 주소 인수를 전달하지 않는다.
from selenium import webdriver
driver = webdriver.Chrome()
Ref.
공식 문서에서 찾아보려 했는데 실패했다...
* 잘못된 부분에 대해 댓글 남겨주시면 감사하겠습니다! 😀
'Python > Error' 카테고리의 다른 글
[Python/Error] TypeError: 'map' object is not subscriptable (0) | 2023.02.21 |
---|---|
[Python/Error] 'KeyedVectors' object has no attribute 'syn0' (0) | 2022.05.22 |