driver
in Selenium?driver
is a controller object that launches and automates a real browser instance (like Chrome, Firefox, etc.) via the Selenium WebDriver protocol.
For example:
driver = webdriver.Chrome()
This line:
driver.quit()
?If you don’t call driver.quit()
, several issues can occur:
.quit()
, this data might not be deleted, causing unnecessary disk usage.webdriver.Chrome()
without a corresponding quit()
adds to the number of open file handles and processes.Too many open files
errors.driver.close()
and driver.quit()
Method | What it does |
---|---|
driver.close() | Closes only the current tab/window. |
driver.quit() | Closes all tabs/windows and ends the browser process. This is what you usually want at the end of a script. |
driver.quit()
at the end of your script to gracefully shut down the browser and clean up.driver
is your interface to a real browser, giving you full control over it via Python.본 후기는 [한글과컴퓨터x한국생산성본부x스나이퍼팩토리] 한컴 AI 아카데미 (B-log) 리뷰로 작성 되었습니다.
#한컴AI아카데미 #AI개발자 #AI개발자교육 #한글과컴퓨터 #한국생산성본부 #스나이퍼팩토리 #부트캠프 #AI전문가양성 #개발자교육 #개발자취업