4

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.

BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
  • Which version of WatiN are you using? The latest official release (1.3.0) doesnt work with IE8, but the 2.0 RC should be ok. – Sam Warwick Mar 17 '10 at 22:12
  • and Internet Explorer 8.0.7600.16385 – BuddyJoe Mar 18 '10 at 13:06
  • I'm getting a similar error: System.Runtime.InteropServices.COMException : The requested resource is in use. (Exception from HRESULT: 0x800700AA) at SHDocVw.InternetExplorerClass.Navigate2(Object& URL, Object& Flags, Object& TargetFrameName, Object& PostData, Object& Headers) at WatiN.Core.Native.InternetExplorer.IEBrowser.NavigateTo(Uri url) at WatiN.Core.Browser.GoTo(Uri url) at WatiN.Core.Browser.GoTo(String url) – Chris Missal Mar 24 '10 at 19:07

5 Answers5

6

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

Daniel Lee
  • 7,709
  • 2
  • 48
  • 57
2

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

Mike
  • 21
  • 1
2

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

Community
  • 1
  • 1
Nick Josevski
  • 4,156
  • 3
  • 43
  • 63
1

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

Louis Somers
  • 2,560
  • 3
  • 27
  • 57
1

in win 7 sp1
reduce security level in user configuration managment

  • Did I miss a SP1 patch somehow? You do mean the Windows User Security screen right? I'll give that a shot. +1 – BuddyJoe Sep 01 '10 at 15:53