• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

headless 옵션 시 warning

19.06.26 20:33 작성 조회수 2.32k

1

C:/Users/user/Desktop/hotch/02 selenium/twitch.py:7: DeprecationWarning: use options instead of chrome_options
  driver = webdriver.Chrome('chromedriver', chrome_options=options)

options = webdriver.ChromeOptions()
options.add_argument('headless')

driver = webdriver.Chrome('chromedriver', chrome_options=options)

이렇게 실행시켰을 때,

이와 같은 경고가 발생합니다.

무엇이 문제인지 알고싶습니다

답변 2

·

답변을 작성해보세요.

2

options.add_argument('headless')

 

options.headless = True

로 변경해보시겠어요?

1

한준규님의 프로필

한준규

질문자

2019.06.26

같은 경고문이 뜨네요 경고문을 다시읽어보니 chrome_options 대신 options를 쓰라고 하는 것같아서

그렇게 바꾸니까 경고문이 사라졌습니다!