我正在运行的测试需要每次都打开一个新的 IE 实例以进行新测试。我的第一个测试通过并在最后关闭了 IE,然后我的下一个测试必须打开一个新的 IE,但它在那时失败并给我以下错误
SetUp method failed. System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6.
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess)
在 WatiN.Core.IE..ctor()
我目前正在使用 teamcity v5.1.4、nunit 2.5.5、watin 2.0 在带有 .net framework 3.5 的 Windows 7 机器上运行它们
以下是失败的代码。
<TestFixtureSetUp()> _
Public Sub Setup()
System.Threading.Thread.Sleep(100)
_internetExplorer = New IE()
LoginUser()
CheckForDataBase()
End Sub
<TestFixtureTearDown()> _
Public Sub TearDown()
Logout()
_internetExplorer.Close()
End Sub
知道这可能是什么原因