110,533
社区成员
发帖
与我相关
我的任务
分享
Condition conditions = new AndCondition(new PropertyCondition(AutomationElement.IsEnabledProperty, true), new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.ListItem));
AutomationElement listitem = list.FindFirst(TreeScope.Children, conditions);//正常无误
list.FindAll(TreeScope.Children, conditions);//卡死
IUIAutomationElement list = elementBrowser.FindFirst(TreeScope.TreeScope_Subtree, conditionHyperlist);
IUIAutomationCondition conditionHyperlistitem = _automation.CreatePropertyCondition(_propertyIdControlType, _controlTypeIdHyperListItem);
IUIAutomationElementArray listitems = list.FindAll(TreeScope.TreeScope_Children, conditionHyperlistitem);
using interop.UIAutomationCore;