splinter icon indicating copy to clipboard operation
splinter copied to clipboard

quit () can not completely quit chrome when use <ctrl-c> to break script in win10

Open fcying opened this issue 8 years ago • 1 comments

When I use ctrl-c to exit the script, quit() can not completely quit chrome, the process also left two.

If it is overtime exit, no problem.

from splinter.browser import Browser
import time

b = Browser('chrome', headless=True)
print("loop")
try:
    count = 0
    while True:
        time.sleep(1)
        count += 1
        if count > 10:
            break
except KeyboardInterrupt:
   print("KeyboardInterrupt")

print("quit")
b.quit()

chrome v62 ChromeDriver 2.35.528161 Python 3.6.3 os win10 x64

fcying avatar Jan 17 '18 06:01 fcying

This doesn't appear to be a splinter issue, but https://stackoverflow.com/questions/27495376/catching-keyboardinterrupt-without-closing-selenium-webdriver-sessions-in-pyth is probably in the right direction.

javascript-error avatar Jul 12 '20 14:07 javascript-error