Anyone know how to fix intermittent 'Access is denied' errors when trying to .quit() Chrome in Selenium WebDriver tests? It's happening about 1 in 10 times.
Here's the traceback:
Traceback (most recent call last):
File "C:\blah.py", line 30, in blah_test
self.browser.quit()
File "C:\Python27\lib\site-packages\selenium-2.15.0-py2.7.egg\selenium\webdriver\chrome\webdriver.
py", line 62, in quit
self.service.stop()
File "C:\Python27\lib\site-packages\selenium-2.15.0-py2.7.egg\selenium\webdriver\chrome\service.py
", line 94, in stop
os.kill(self.process.pid, signal.SIGTERM)
WindowsError: [Error 5] Access is denied
The code is (I've simplified it here):
from selenium import webdriver
self.browser = webdriver.Chrome()
self.browser.quit()
I'm on Windows 7 using latest ChromeDriver.exe (version 17 I think it is) and latest Selenium (2.15) and Python 2.7.x.