강의

멘토링

커뮤니티

Inflearn Community Q&A

matinblake's profile image
matinblake

asked

Automating Marketing with Python

Learn how to use Selenium

크롬이 자동으로 닫힙니다.

Written on

·

1.1K

0

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

url = 'https://nid.naver.com/nidlogin.login?mode=form&url=https%3A%2F%2Fwww.naver.com'

driver.get(url)

위와 같이 코드를 작성하고 나서 실행하면,

크롬 브라우저가 실행되는데, 열리자마자 자동으로 닫혀버립니다.

어떻게 하면 될까요?

C:\Users\spear\PycharmProjects\test1\main.py:4: DeprecationWarning: executable_path has been deprecated, please pass in a Service object

driver = webdriver.Chrome(ChromeDriverManager().install())

종료 코드 0(으)로 완료된 프로세스

참고로 실행하면 터미널에 위와 같이 에러가 발생합니다.

 

pythonselenium

Answer 1

0

starcoding님의 프로필 이미지
starcoding
Instructor

크롬 브라우저를 최신 버전으로 업데이트 해보세요.

그래도 안되신다면 다음 링크를 참조해보세요.

https://velog.io/@sangyeon217/deprecation-warning-executablepath-has-been-deprecated

matinblake's profile image
matinblake

asked

Ask a question