Skip to content

Tree

Usage notes

  • Child items appear after their parent expands. WPF creates a node's items only once the node is expanded, so reading items straight after expand() can return a partial list, especially on a slow CI machine. Wait for the children with Retry.WhileEmpty (or until the count you expect) before indexing into them (#76).
  • Expand level by level. Expand a parent, wait for its children, then go one level deeper.

flaui.core.automation_elements.Tree

Bases: AutomationElement

Class to interact with a tree element.

items property

All child TreeItem" /> objects from this Tree" />

Returns:

Type Description
List[TreeItem]

List of TreeItem elements

selected_tree_item property

The currently selected TreeItem" />

Returns:

Type Description
TreeItem

TreeItem element of selected tree item