WatiN and Vista RC1

I have spent the evening debugging WatiN on Vista RC1, and I have uncovered the following issues:

1. Your test tool of choice must be run as administrator.

If you are using nunit or VSTS to run your tests you MUST run them as administrator. If you don’t then a second process is spawned in the ie.goto function when Internet explorer’s Navigate function is called. The second process will then go where you told it, and the original process will just hang and never load.

2. Finding IE by title doesn’t work as expected.

The AttachToIEByPartialTitleAndByUrl unit test fails. On further digging this one get’s interesting. If you launch a browser window, and point it to www.google.com, the test will fail because it finds the window as expected. However when WatiN opens a window itself and points it to google the same comparison fails. The problem is that in FindIE, the following line.

ShellWindows allBrowsers = new ShellWindows();

Does not return the ie windows that WatiN has created, as expected. A solution here may be to replace that

Leave a Reply