【发布时间】:2013-01-30 19:21:30
【问题描述】:
我有一个对象树,它在父表中包含行对象。我正在尝试将所有这些行放入 AutomationElementCollection
AutomationElementCollection asdf = ParentTableObj.FindAll
(
TreeScope.Children,
new PropertyCondition
(
AutomationElement.NameProperty,
"I want to use regex here"
)
);
所有行的AutomationElement.NameProperty 都包含字符串“row”。但是,它们是该字符串的变体 - 例如“Row1”、“Row2”、“TopRow”、...
似乎我可能遗漏了一些东西,因为FindAll 方法允许您定义TreeScope 并找到与提供的Condition 参数匹配的任何AutomationElement。我只是希望我的条件不受限制,因为我已经可以通过TreeScope 控制查找范围。
【问题讨论】:
标签: c# windows automation ui-automation automationelement