在 python 中使用 selenium 的退出功能时出现 Firefox 错误

Firefox error occurs when use quit function of selenium in python

我正在尝试 运行 导入 selenium 的 python 脚本(使用 firefox 浏览器)。 我试过 close().. 但它不起作用.. window 保持不变 在脚本之后我想关闭 firefox window,所以我使用 driver.quit() 并且它成功地关闭了 window,但是它给了我一个错误,比如(我试图附上一张图片,但是我失败了...所以只提供错误 window 包含的文本)

The exception Breakpoint A breakpoint has been reached. (0x80000003) occurred in the application at location 0x73xe9ec83.

Click on OK to terminate the program

而且我认为有些人遇到了同样的问题但找不到解决方案.... https://github.com/mozilla/geckodriver/issues/375

这是退出驱动程序的一个已知 Firefox/geckodriver 问题,有关详细信息,请参阅 here

在某些FF版本中出现,有人说是固定的,有人说不是。我找不到更好的解决方案,所以我打开了 'old' Firefoxdriver 和 FF v47.0.2,效果很好。