请教下版主,引擎报这个错误应该怎么处理呢?

提问 3 105
finn
finn LV2 6月11日 21:16 发表
<p><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-06-11 13:12:49.852189 - Debug - WEB操作[屏幕截图]开始</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-06-11 13:12:50.087512 - Error - 无法执行screen shot</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-06-11 13:12:50.087728 - Debug - WEB操作[屏幕截图]结束</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-06-11 13:12:50.116593 - Error - Message: invalid session id</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-06-11 13:12:50.126273 - Error - 程序错误信息:</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">Traceback (most recent call last):</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 57, in loop_execute step.execute()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/teststep.py", line 39, in execute self.result = func(self.test, self.driver, **opt_content)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/find_opt.py", line 50, in save_screenshot Browser(test, driver).save_screenshot(kwargs["data"]["name"])</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/driver/browserOpt.py", line 87, in save_screenshot raise e</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/driver/browserOpt.py", line 82, in save_screenshot screenshot = self.driver.get_screenshot_as_png()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1064, in get_screenshot_as_png return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1074, in get_screenshot_as_base64 return self.execute(Command.SCREENSHOT)['value']</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed (Session info: chrome=125.0.6422.60)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">During handling of the above exception, another exception occurred:</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">Traceback (most recent call last):</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/unittest/case.py", line 60, in testPartExecutor yield</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/unittest/case.py", line 676, in run self._callTestMethod(testMethod)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/unittest/case.py", line 633, in _callTestMethod method()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/lm/lm_case.py", line 29, in testEntrance WebTestCase(test=self).execute()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 30, in execute self.loop_execute(self.case_message['optList'], [])</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 63, in loop_execute self.test.saveScreenShot(opt_content['operationTrans'], self.driver.get_screenshot_as_png())</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1064, in get_screenshot_as_png return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1074, in get_screenshot_as_base64 return self.execute(Command.SCREENSHOT)['value']</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">selenium.common.exceptions.InvalidSessionIdException: Message: invalid session id</span><br></p>
收藏(0)  分享
相关标签: 提问
注意:本文归作者所有,未经作者允许,不得转载
3个回复
  • finn
    finn LV2 (楼主)
    6月12日 20:30
    大佬方便看下吗?
    0 0
  • Chras-fu
    6月13日 08:50
    谷歌浏览器版本有点高,用的本地浏览器吧,驱动不对
    0 1