views:

992

answers:

3

I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. It is failing when just trying to load a page with the following exception: WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer busy.

I've set the test timeout to 3 minutes which should be plenty.

I've read that this could be caused by IE protected mode, but I'm not sure how to disable that for the TFSService account.

I'm using Visual Studio/TFS 2008 on Windows Server 2008.

Has anyone else hit this problem and found a solution?

+1  A: 

I've only used WatiN on Vista, which had a similar timeout problem. I was much happier when I switched to FireFox for my tests.

Anyway, here is a possible solution:

http://msdn.microsoft.com/en-us/magazine/dd744751.aspx

The ASP.NET Development Server only listens for requests on IPv4, not IPv6. If you are running Windows Vista or Windows Server 2008, requests for "localhost" will resolve to the IPv6 address of ::1 by default rather than the IPv4 address of 127.0.0.1 and the WatiN tests will fail. To resolve this issue, comment out the IPv6 localhost address in your C:\Windows\System32\drivers\etc\hosts file. This is the line with "::1 localhost".

Praveen Angyan
I had a different but related experience and didnt resort to switching browser (ideally, you'd be testing with both after all), see http://stackoverflow.com/questions/750600/watin-compatibility-with-windows/1496925#1496925
Ruben Bartelink
+1  A: 

I found the solution to this - it was to turn off "IE Enhanced Security Configuration" for Administrators.

Next problem is that WatiN thinks it is not running in a STA thread - I'll post a separate question on that.

Craig Fisher
How to turn off "IE Enhanced Security Configuration"?
Amitabh
Depends on your OS. Try this: http://social.technet.microsoft.com/Forums/en-US/winserversecurity/thread/8fb8889b-1036-43f0-8ecf-3749c143bad7
Craig Fisher
A: 

I had a different but related experience, see http://stackoverflow.com/questions/750600/watin-compatibility-with-windows/1496925#1496925

Ruben Bartelink