WatiN Compatibility with Windows

半城伤御伤魂 提交于 2019-12-01 16:46:43

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)

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).

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).

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

Jeroen van Menen

I run our WatiN integration test suite (hundreds of tests) on Windows 2003 with IE6. Works fine, no special tricks done. What is the exception you are getting? Are you sure mshtml.dll (the COM dll somewhere in the windows directory) is registered correctly on this machine? Do you have the Microsoft.mshtml.dll (interop assembly) and interop.shdocvw.dll in the same directory as WatiN.Core.dll?

Update: Its officially supported, from the faq

Which windows versions are supported?

Windows 2000, Windows XP, Windows 2003 and Windows 2008.

Original post:

I use it on vista all the time. I haven't used it on windows server 2003 though.

Have you tried logging on interactively into the server and trying to run the tests manually? It may be because of the account that your build server is running under or some particular security settings you have setup. Have you checked to see if IE is stopping you from viewing the page due to it not being in the trusted sites list?

I was using Watin 1.3 on Windows XP but the same on Win 7 having problem.... Officially Watin 1.3 works on O.S. Xp and earlier on Win XP

But Watin 2.1 works fine on Win 7 and XP. Officially Watin 2.1 supports any Microsoft O.S.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!