开发者

ASP.NET Unit Testing - WatiN and Windows 7 / Internet Explorer 8

开发者 https://www.devze.com 2022-12-23 01:14 出处:网络
Any tricks in getting WatiN to run on Win7/IE8? My code: browser = new IE(); browser.GoTo(\"http://testserver\");

Any tricks in getting WatiN to run on Win7/IE8?

My code:

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

The third line never really runs and I get an error back:

S开发者_运维百科ystem.Runtime.InteropServices.COMException : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

The second line seems to run. IE8 appears and is navigated to the correct URL.


Running Visual Studio as Administrator solved this problem for me. (Visual Studio 2008 with WatiN 2.0.20).


Reboot the machine

There are windows updates getting in the way of instantiating new COM objects.

See my answer on this question for more details:

WatiN, NUnit and CruiseControl.NET-- Error message 800704a6


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


in win 7 sp1
reduce security level in user configuration managment


I started to get the same exceptions: "System.Runtime.InteropServices.COMException : The RPC server is unavailable." after closing IE while the Developer Tools pane was open.

Hit F12 to close the developer pane and make sure it is closed whenever you close IE (IE remembers the state when starting).

0

精彩评论

暂无评论...
验证码 换一张
取 消