WatiN 与 Windows 的兼容性 [英] WatiN Compatibility with Windows

查看:58
本文介绍了WatiN 与 Windows 的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows XP 上成功运行了测试,但在运行 Windows 2003 时甚至没有成功构建.

I am running tests successfully on Windows XP but not even got a single successful build while running through Windows 2003.

任何人都知道它是否兼容,因为我在某个网站上读到 WatiN 在 XP 上进行了全面测试,而不是在其他 Windows 版本上进行了测试.

Any one knows whether it is compatible or not as I read on some site that WatiN is fully tested on XP and not on other Windows editions.

推荐答案

我通常会将此作为对 Sam 答案的评论发布,但我正在尝试使堆栈跟踪可搜索,所以这里...

I'd ordinarily post this as a comment on Sam's answer, but I'm trying to make a stack trace searchable, so here goes...

WatiN.Core.Exceptions.IENotFoundException : Could not find an IE window matching constraint: Timeout while waiting to attach to newly created instance of IE.. Search expired after '30' seconds.
at WatiN.Core.IE.CreateIEPartiallyInitializedInNewProcess()
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor(String url, Boolean createInNewProcess)
c:\...\WithVendorSite.cs(42,0): at WithVendorSite.VerifyCanLogIn(TargetSite target)

我在 Windows 7 上针对 WatiN 2.0.10.928 开发了我的测试,但是当在带有最新 WU 的 Windows Server 2008 上运行时,测试一直卡在地址栏中带有 about:blank 的空白浏览器上和增强的安全配置关闭并运行提升的测试(以管理员身份运行).

I developed my test on Windows 7 against WatiN 2.0.10.928 but the test was continually getting stuck with a blank browser with about:blank in the address bar when run on Windows Server 2008 with latest WUs, and Enhanced Security Configuration turned off and running the tests elevated (Run as Administrator).

我的问题(感谢 Sam)是 bin 目录中没有 Microsoft.mshtml.dll(我发现 Interop.shdocvw.dll 是从我在 Windows 7 端遇到的错误消息中需要).

The problem in my case (thanks Sam) was the absence of Microsoft.mshtml.dll in the bin directory (I had figured out Interop.shdocvw.dll was necessary from error messages I'd encountered on the Windows 7 side).

添加Microsoft.mshtml.dll后,运行愉快,ESC转回来[但测试过程需要运行提升].

After adding Microsoft.mshtml.dll, things run happily with ESC turned back [but the test process needs to run elevated].

这篇关于WatiN 与 Windows 的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆