-->

华廷错误 - 无法投型的COM对象mshtml.HTMLDocumentClass'到接口类

2019-09-29 01:25发布

我一直无法在WatiN.Core.IE构造函数来解决这个错误。 这是华廷1.3,因为我使用这似乎取决于华廷1.3 MvcContrib.TestHelper.WatiN。 这是Windows 7 64位计算机上。 我的同事有相同的配置,并能没有这个错误运行测试。

TearDown : System.InvalidCastException : Unable to cast COM object of type 'mshtml.HTMLDocumentClass' to interface type 'mshtml.DispHTMLDocument'. 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)).
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, ref MessageData msgData)
at mshtml.HTMLDocumentClass.get_readyState()
at WatiN.Core.WaitForComplete.WaitWhileDocumentStateNotComplete(IHTMLDocument2 htmlDocument)
at WatiN.Core.WaitForComplete.WaitForCompleteOrTimeout()
at WatiN.Core.IEWaitForComplete.DoWait()
at WatiN.Core.DomContainer.WaitForComplete(IWait waitForComplete)
at WatiN.Core.IE.WaitForComplete()
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor()
文章来源: Watin error - Unable to cast COM object of type 'mshtml.HTMLDocumentClass' to interface type 'mshtml.DispHTMLDocument'
标签: watin