我一直在使用 IEWebDriver 遇到这一系列间歇性故障:
首先,测试失败并且无法使用 .quit() 方法关闭驱动程序。我认为这第一次失败是因为 IEDriver 炸弹。
我得到一个对话框:
Command line server for IE Driver has stopped working
第一次失败后,IEDriver 会打开 IE,但是当您尝试对页面中的对象执行操作时,您会收到 SocketTimeoutException。有趣的是,这个错误需要 3 小时才能失败:
java.net.SocketTimeoutException: Read timed out Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z' System info: host: 'WORKSTATION-3', ip: '172.26.50.248', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_92' Driver info: driver.version: RemoteWebDriver
如何阻止 IEDriver 轰炸,如果我不能阻止它阻止下一个测试运行?