Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UI Automation White framework "NonComVisibleBaseClass was detected" exception

I am testing an application which loads a powerpoint (.ppt or .pptx) file insert it. Application gives same look an feel like powerpoint with some extra setting when the file is loaded inside the application. When I try to automate the application, I click a button to load the powerpoint file into the application. After the loading process white framework fails to continue playback.

When I restart the same test again I got "NonComVisibleBaseClass was detected" exception.

I can only continue my testing after restarting the entire application. Does anyone face this kind of issue? your answers will really helpful to continue my testing.

like image 694
S.Roshanth Avatar asked Mar 13 '14 05:03

S.Roshanth


2 Answers

It's known issue.
http://social.msdn.microsoft.com/Forums/en-US/27c3bae8-41fe-4db4-8022-e27d333f714e/noncomvisiblebaseclass-was-detected?forum=Vsexpressvb

  1. Navigate to Debug->Exceptions...
  2. Expand "Managed Debugging Assistants"
  3. Uncheck the NonComVisibleBaseClass Thrown option.
  4. Click [Ok]
like image 182
drets Avatar answered Oct 21 '22 01:10

drets


I stumbled upon this page after having the same problem. Although I'm not sure this solution may help you it helped me and maybe can be useful to someone else.

My WPF application needed to run with elevated privileges and if I tried to run VS without elevated privileges my tests broke with the aforementioned error. What I did was simply restar VS as Administrator and the tests started working.

One thing I noticed was that when I was running without elevated privileges the Window.Framework was 'Win32' and the Window.Items was empty. After running VS as Administrator The Framework propery was 'Wpf' and the Items list was filled correctly. I don't know what is the real cause of the problem here. But it worked for me and maybe it'll work for someone else.

like image 37
Alan Corrêa da Silva Avatar answered Oct 21 '22 00:10

Alan Corrêa da Silva