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

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:

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

Answers


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


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


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


Need Your Help

glassfish v3 "unable to find valid certification path to requested target"

java glassfish ssl-certificate keytool solaris-10

I realize that this question may appear to be a duplicate, but none of the threads I've browsed seem to address or help my situation.

Scale a circle at same center position

ios objective-c core-animation cashapelayer

I am working on scaling the circle and keep the same center position, which looks like the pulsing circle on map.