How do you get WatiN to work on Windows Server 2008 with IE8?

前端 未结 5 517
南旧
南旧 2020-12-08 15:32

My problem is that I cannot get a simple WatiN test to reliably work on my development machine which is running Windows Server 2008 and IE8.

I have seen a couple of

相关标签:
5条回答
  • 2020-12-08 16:01

    Run Visual Studio as Administrator

    0 讨论(0)
  • 2020-12-08 16:15

    I was able to get this COM error to go away -- and get my tests running normally -- by adjusting my Internet Security settings to "Enable Protected Mode" even for Local Intranet sites. This single checkbox made all the difference. (And I don't have to run Visual Studio as Administrator.)

    See this blog post for fixing this problem without running Visual Studio as Administrator.

    Briefly:

    In Internet Explorer, open Tools -> Internet Options -> Security -> Local intranet and check the box "Enable Protected Mode."

    I'm running IE 8 and Visual Studio 2010 on Windows 7.

    0 讨论(0)
  • 2020-12-08 16:15

    The other alternative to avoid running Visual Studio or NUnit as an admin would be to disable UAC at a machine level, which shouldn't be a security issue if you are running with least privileges (which you should be).

    0 讨论(0)
  • 2020-12-08 16:18

    Regarding the error you're seeing on firefox... That can be overcome by installing the FireWatir FF plugin. (Or at least that worked for me on 3.5.3)

    But as already mentioned, IE is supported and in a WatiN context, using FireFox is no magic solution.

    0 讨论(0)
  • 2020-12-08 16:20

    IE8 definatley works with WatiN, and has done since the first public release of IE8.

    If something is working in debug but not when running it usually points to a timing or Server 2008 security lockdown issue.

    You should putting the line that is failing in a try catch, then if there is an exception pause for say half a sec and then re-try again.

    Also ensure that you have turned off all the extra server security lockdowns, and are running nUnit as administrator to avoid UAC getting in the way.

    0 讨论(0)
提交回复
热议问题