UIAutomation获取QQ会话聊天信息不全

        IntPtr k = FindWindow(null, "DCC");
        AutomationElement window2 = AutomationElement.FromHandle(k);
        PropertyCondition xEllist2 = new PropertyCondition(AutomationElement.NameProperty, "DCC");
        AutomationElementCollection targetElement2 = window2.FindAll(TreeScope.Element, xEllist2);
        AutomationElement AllEdit2 = window2.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.NameProperty, "消息"));

        AutomationElementCollection ALLMsg2 = AllEdit2.FindAll(TreeScope.Descendants,
    new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.ListItem));

      
        List<string> message2 = new List<string>();
        foreach (AutomationElement item in ALLMsg2)
        {
            string aaa = (item.Current.Name + "\r\n");
            message2.Add(aaa);
        }

DCC为qq窗口

img

获取的消息列表中只能到1

img


请问这是什么原因