首页 > 解决方案 > 使用 Python 和 Selenium 无法访问 chrome

问题描述

我有一个带有 selenium 的 python 脚本,大部分时间都可以正常工作。但有时,由于未知原因,Chrome 关闭并且脚本继续运行,但它尝试发送到 Chrome 的每个操作都会引发错误:

Message: chrome not reachable
  (Session info: chrome=94.0.4606.71)

如果出现故障,我怎样才能捕捉到该错误并重新启动 chrome?

谢谢

标签: pythonseleniumgoogle-chrome

解决方案


推荐阅读