Watin错误 - 无法将类型为“mshtml.HTMLDocumentClass”的COM对象强制转换为接口类型“mshtml.DispHTMLDocument”

时间:2011-07-25 02:43:14

标签: watin

我无法在WatiN.Core.IE构造函数中解决此错误。这是WatiN 1.3,因为我使用的是MvcContrib.TestHelper.WatiN,它似乎依赖于WatiN 1.3。这是在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()

0 个答案:

没有答案
相关问题