Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 995
BuddyJoe Avatar asked Dec 18 '22 02:12

BuddyJoe


2 Answers

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

like image 83
Daniel Lee Avatar answered Dec 26 '22 06:12

Daniel Lee


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

like image 39
Nick Josevski Avatar answered Dec 26 '22 06:12

Nick Josevski