MSAA UI Automation get_accChildCount Incorrectly Returning 0 for Infragistics UltraTree in Winforms

依然范特西╮ 提交于 2019-11-29 18:17:19

I had the same problem for an infragistics control. If you are able to change the application under test you have 2 options, otherwise i think there is no solution and you are trapped.


a) override the AutomationPeer implementation of your UltraTree, so just create your own CustomizedUltraTree. Here is a useful link on this topic Docu


b) contact infragistics customer support, for me it was just some versioning issue and they were pretty quick and confident.

Kind of a crummy answer, but I ended up finding that by running under the CLR (flipping /clr on) the correct number of children is returned. So literally same exact code with the only difference being whether or not the /clr compiler switch is specified. I really don't want to run this code under the CLR though so this isn't an ideal solution for me, but it does technically answer my question.

I will have to post another question asking why this might be happening :(

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