Error loading CUITe.dll: Unable to load the test container CUITe.dll' or one of its dependencies.

Sep 18, 2012 at 12:41 AM

I am new to CUITe. I have this error when I create a new test project using CUITe. I made reference CUITe.dll from C:\Program Files*\Microsoft\CUITe folder.

Coordinator
Sep 18, 2012 at 1:08 AM

Hi selecao338,

As indicated in the Quick Start guide and documentation, the pre-requisites for CUITe are:

  1. Visual Studio 2010 Premium or Visual Studio 2010 Ultimate
  2. Visual Studio 2010 Feature Pack 2

Do you have those products installed?

Thank you.

Sep 18, 2012 at 1:47 AM

Yes, I am using Visual Studio Ultimate and I installed Visual Studio 2010 Feature Pack 2.

Coordinator
Sep 18, 2012 at 2:03 AM

I am wondering where you see this error and if you can paste the complete error, including details and stack trace please.

For example, do you get this error when you try to build or when you run the test?

Also, can you post the project and I can try to reproduce the issue on my machine?

Thank you.

Sep 18, 2012 at 2:14 AM

I get this error when I try to build the project. Can you tell me how to post my project for you to view it?

My error is "Error loading C:\Users\Tu.Huynh\Documents\Projects\CUITe\CUITe\bin\Debug\CUITe.dll: Unable to load the test container 'C:\Users\Tu.Huynh\Documents\Projects\CUITe\CUITe\bin\Debug\CUITe.dll' or one of its dependencies. Error details: System.TypeLoadException: Could not load type 'CUITe.Controls.HtmlControls.CUITe_BrowserWindow' from assembly 'CUITe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."

Thank you.

Coordinator
Sep 18, 2012 at 2:42 AM
Edited Sep 18, 2012 at 2:43 AM

I am wondering if you can:

1. Expand the References node of your test project.
2. Right-click on CUITe and select Properties.
3. Set "Copy Local" to True
4. Save, rebuild and run the test

Thank you.

Sep 18, 2012 at 3:42 AM

It is already set True. And I still have that error.

Sep 18, 2012 at 5:42 AM

I found the reason. I think that's because I did not create the coded UI test file first. Now I can build the project successfully. But now I have an error in the red line below:

 

CUITe_BrowserWindow.Launch("http://myweb.com");

GlobalIntegrator login = CUITe_BrowserWindow.GetBrowserWindow<GlobalIntegrator>();

And the error is: Object reference not set to an instance of an object.

Can you tell me how to fix this?

Thank you so much.

Coordinator
Sep 18, 2012 at 7:37 AM

I'm glad you found the reason to your first problem. :)

How is GlobalIntegrator defined?

Sep 18, 2012 at 9:24 AM

I also found the reason. I did not define the "title" of the browser window in the class GlobalIntegrator.