Windows Server 2008 IE8 中的 WatiN 超时
我使用 WatiN 和 MBunit 创建了一些自动化测试,它们在我的机器上运行良好(运行 Windows 7 和 VS 2010)。
但是,当我尝试在运行 Windows Server R2 2008 和 IE8 的虚拟机上运行它们时,除非我定期单击窗口,否则我的测试始终会超时。
IE 未处于保护模式。此外,每次启动浏览器时,都会调用 WatiN“BringToFront”方法,但它似乎并没有真正将浏览器带到前面,它总是在 Visual Studio 2010 之后打开。
I've created some automated tests using WatiN and MBunit and they run fine on my machine (running Windows 7 and VS 2010).
However, when I try running them on a virtual machine which is running Windows Server R2 2008 and IE8 my tests consistently timeout unless I am clicking into the window periodically.
IE is not in protected mode. Also each time a browser is launched the WatiN "BringToFront" method is called, but it doesn't seem to actually bring the browser to the front, it always opens behind Visual Studio 2010.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来这是由两个原因引起的,一是IE8的bug,解决方法是打开“工具”->“浏览器”。互联网选项 ->高级并取消选中“显示图片”
另一个修复方法是打开 Regedit,在文件夹树中导航到 HKEY_CURRENT_USER\Control Panel\Desktop。将 ForegroundFlashCount 更改为 0,然后注销并再次打开。 (此修复是针对每个用户的设置,因此每个测试用户都需要进行修复)
Looks like this is caused by two things, one is an IE8 bug, the workaround is to open Tools-> Internet Options -> Advanced and un-check "Show Pictures"
The other fix is to open Regedit, in the folder tree navigate to HKEY_CURRENT_USER\Control Panel\Desktop. Change the ForegroundFlashCount to 0, then log off and on again. (this fix is a per-user setting, so each testing user will need to do the fix)