【发布时间】:2011-05-25 20:52:51
【问题描述】:
我正在运行的测试需要每次都打开一个新的 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()
我目前在带有 .net framework 3.5 的 windows 7 机器上使用 teamcity v5.1.4、nunit 2.5.5、watin 2.0 运行它们
以下是失败的代码。
<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
知道这可能是什么原因
【问题讨论】:
-
谷歌搜索错误 800704a6 后,似乎是 javascript 错误。你认为你可以调试你的代码以便能够在第二次打开浏览器时看到 javascript 控制台吗?另外,您是否仅在 teamcity 中存在这种行为,还是可以通过手动运行 nuni-console 来重现它?
-
是的,仅当我通过 teamcity 运行测试时才会出现此错误。在本地或通过 cc.net 从 nunit 运行时工作正常。
标签: windows-7 watin nunit-2.5 teamcity-5.1