在关闭driver时,如果用close,而不是用quit,会出现如下错误:
Exception ignored in: <bound method Popen.__del__ of <subprocess.Popen object at 0x0000027A6CAD1278>>
Traceback (most recent call last):
File "E:\python36\lib\subprocess.py", line 768, in __del__
self._internal_poll(_deadstate=_maxsize)
File "E:\python36\lib\subprocess.py", line 1035, in _internal_poll
if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
OSError: [WinError 6] 句柄无效。
原因,close只关闭当前window,而quit才能退出整个driver,
感谢原作 https://www.cnblogs.com/xqnq2007/p/7929346.html
selenium _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0
原文:https://www.cnblogs.com/TNT-c/p/11046700.html