UI Automation White framework “NonComVisibleBaseClass was detected” exception

泄露秘密 提交于 2020-08-02 08:11:47

问题


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.


回答1:


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]



回答2:


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.



来源:https://stackoverflow.com/questions/22369814/ui-automation-white-framework-noncomvisiblebaseclass-was-detected-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!