Watin error - Unable to cast COM object of type &#

2019-08-03 03:08发布

I have been unable to solve this error in the WatiN.Core.IE constructor. This is WatiN 1.3, as I am using MvcContrib.TestHelper.WatiN which appears to depend on WatiN 1.3. This is on a Windows 7 64-bit machine. My colleague has the same configuration and is able to run our tests without this error.

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
0条回答
登录 后发表回答