Search code examples
c#-4.0watin

WatiN: Error opening Internet Explorer


I have a C# (Visual Studio 2010) project that opens Internet Explorer 8 like this:

Brower browser = new WatiN.Core.IE( "http://google.com");

This used to work, but I had some problems that required me to reinstall Internet Explorer (I am on Window 7). I am using the .NET 4.0 framework (although I have tried changing).

Now, I get this exception:

Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

I can open Internet Explorer manually, fine.

I am using Watin 2.0 (I have also tried 2.1).


Solution

  • I switched project from "Any CPU" to "x86" and this problem went away. I am on a 64-bit CPU.