WatiN“无法转换 COM 对象”例外
有时,我的监控应用程序会无缘无故地死掉。似乎“mshtml.HTMLDocument”资源不可用。还有其他人经历过类似的事情吗?提前致谢。
错误消息:
14.04.2011 18:26:37 -> Test 1.2 (Subscriber type requests), error: Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F55F-98B5-11CF-BB82-00AA00BDCE0B}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
错误堆栈跟踪:
14.04.2011 18:26:37 -> Test 1.2 (Subscriber type requests), trace: at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.WaitForFramesToComplete(IHTMLDocument2 maindocument)
at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.WaitForFramesToComplete(IHTMLDocument2 maindocument)
at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.WaitForCompleteOrTimeout()
at WatiN.Core.WaitForCompleteBase.DoWait()
at WatiN.Core.IE.WaitForComplete(Int32 waitForCompleteTimeOut)
at WatiN.Core.Browser.GoTo(Uri url)
at WatiN.Core.Browser.GoTo(String url)
at WebMonitor.Tests.Execute() ...
from time to time, my monitoring application dies for no obvious reason. It seems like "mshtml.HTMLDocument" resource isn't available. Anyone else experienced something similar? Thanks in advance.
Error message:
14.04.2011 18:26:37 -> Test 1.2 (Subscriber type requests), error: Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F55F-98B5-11CF-BB82-00AA00BDCE0B}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Error stack trace:
14.04.2011 18:26:37 -> Test 1.2 (Subscriber type requests), trace: at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.WaitForFramesToComplete(IHTMLDocument2 maindocument)
at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.WaitForFramesToComplete(IHTMLDocument2 maindocument)
at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.WaitForCompleteOrTimeout()
at WatiN.Core.WaitForCompleteBase.DoWait()
at WatiN.Core.IE.WaitForComplete(Int32 waitForCompleteTimeOut)
at WatiN.Core.Browser.GoTo(Uri url)
at WatiN.Core.Browser.GoTo(String url)
at WebMonitor.Tests.Execute() ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢您的报告。我已经在演员阵容周围进行了重试。这个异常可能是由于时间原因造成的。希望重试能解决这个问题。将成为下一个版本的一部分或从 SourceForge 获取最新代码。
Thanks for reporting. I have put a a re-try around the cast. This exception is probably caused by timing. Hope the re-try will fix it. Will be part of the next release or get the latest code from SourceForge.