테이블 부모 내에 행 개체가있는 개체 트리가 있습니다. 나는 AutomationElementCollection
Windows.Automation을 사용하여 정규식으로 AutomationElement를 찾을 수 있습니까?
AutomationElementCollection asdf = ParentTableObj.FindAll
(
TreeScope.Children,
new PropertyCondition
(
AutomationElement.NameProperty,
"I want to use regex here"
)
);
에 행 'AutomationElement.NameProperty
의 모든 문자열 "행"을 포함을 모든 행을 넣어 시도하고있다. 그러나 그 문자열의 변형입니다 (예 : FindAll
방법을 사용하여 TreeScope
을 정의하고 제공 Condition
매개 변수에 일치하는 AutomationElement
을 찾을 수 있기 때문에 내가 뭔가를 누락 될 수 있습니다처럼 "ROW1", "행 2", "TopRow"...
보인다. 검색 범위를 이미 제어 할 수 있으므로 내 조건은 제한되지 않아야합니다. TreeScope
.
FindDescendant가 정의되어 있지 않습니다. –
@ 존 스미스 (John Smith), 답변을 업데이트했으며 이름이 FindFirstDescendant로 변경되었습니다. –