我要在静默模式下运行测试程序,以及如何让 Team City 运行我的测试?
最佳答案
通过设置 MakeNewIeInstanceVisible 标志,可以使 Watin 测试在隐藏 IE 的情况下运行。默认情况下是这样。
在 WatiN 2 候选版本中,可以通过以下方式隐藏 IE:
WatiN.Core.Settings.MakeNewIeInstanceVisible = false;
我没有在早期的 WatiN 版本上进行过测试,但是 releasenotes版本 1.2.0.4 解释了该版本的功能:
By default WatiN tests make the created Internet Explorer instances visible to the user. You >can run your test invisible by changing the following setting. Be aware that HTMLDialogs and >any popup windows will be shown even if you set this setting to false (this is default >behavior of Internet Explorer which currently can't be suppressed).
block 引用>
IE.Settings.MakeNewIeInstanceVisible = false; // default is true
关于teamcity - 使用 Team City 以静默模式运行 Watin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2758104/