how to close Python selenium webdriver window

后端 未结 5 2035
南旧
南旧 2021-02-12 13:30

I have a python script that scraps data off from a website on an hourly basis. It is stored on the server at the moment and is working well as I am using task scheduler to sched

5条回答
  •  故里飘歌
    2021-02-12 14:11

    For Python and chromedriver I've found these two methods useful (mind the difference):

    driver.close() - closes the browser active window.

    driver.quit() - closes all browser windows and ends driver's session/process.

提交回复
热议问题