selenium _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0

在關閉driver時,若是用close,而不是用quit,會出現以下錯誤:html

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] 句柄無效。python

緣由,close只關閉當前window,而quit才能退出整個driver,ui

 

感謝原做 http://www.javashuo.com/article/p-yrbxixaj-gd.htmlhtm

相關文章
相關標籤/搜索