ASP.NET单元测试 - WatiN和Windows 7/Internet Explorer 8

Bud*_*Joe 4 .net internet-explorer automation watin unit-testing

让WatiN在Win7/IE8上运行的任何技巧?

我的代码:

    browser = new IE();
    browser.GoTo("http://testserver");
    browser.TextField(Find.ByName("txtUser")).TypeText("tyndall");
Run Code Online (Sandbox Code Playgroud)

第三行从未真正运行,我收到错误:

System.Runtime.InteropServices.COMException:RPC服务器不可用.(HRESULT异常:0x800706BA)

第二行似乎在运行.IE8出现并导航到正确的URL.

Dan*_*Lee 6

以管理员身份运行Visual Studio为我解决了这个问题.(Visual Studio 2008 with WatiN 2.0.20).