和刚才一样
程序没有退出,预期在你的代码后面还有操作,可没有执行,当手动关闭窗口时,程序提示你的代码报错,说找不到窗口E:\Python\e\venv\Scripts\python.exe E:\python\e\main.py
Traceback (most recent call last):
File "E:\python\e\main.py", line 13, in <module>
answer = ai.ask(question)
File "E:\python\e\gpt.py", line 39, in ask
ActionChains(self.driver).move_to_element(self.driver.find_element(
File "D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 831, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "D:\Python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: unable to send message to renderer
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=113.0.5672.127)
Stacktrace:
Backtrace:
GetHandleVerifier [0x004F8893+48451]
(No symbol) [0x0048B8A1]
(No symbol) [0x00395058]
(No symbol) [0x00386F40]
(No symbol) [0x003875CA]
(No symbol) [0x00396F11]
(No symbol) [0x003974BF]
(No symbol) [0x00399631]
(No symbol) [0x003996D0]
(No symbol) [0x003C00C0]
(No symbol) [0x003C069B]
(No symbol) [0x003EDD92]
(No symbol) [0x003DA304]
(No symbol) [0x003EC482]
(No symbol) [0x003DA0B6]
(No symbol) [0x003B7E08]
(No symbol) [0x003B8F2D]
GetHandleVerifier [0x00758E3A+2540266]
GetHandleVerifier [0x00798959+2801161]
GetHandleVerifier [0x0079295C+2776588]
GetHandleVerifier [0x00582280+612144]
(No symbol) [0x00494F6C]
(No symbol) [0x004911D8]
(No symbol) [0x004912BB]
(No symbol) [0x00484857]
BaseThreadInitThunk [0x75FB00C9+25]
RtlGetAppContainerNamedObjectPath [0x773B7B4E+286]
RtlGetAppContainerNamedObjectPath [0x773B7B1E+238]
进程已结束,退出代码1
|