TreeWalker Class
Provides methods and properties used to navigate the UI Automation tree.
Assembly: UIAutomationClient (in UIAutomationClient.dll)
| Name | Description | |
|---|---|---|
![]() | TreeWalker(Condition) | Initializes a new instance of the TreeWalker class. |
| Name | Description | |
|---|---|---|
![]() | Condition | Gets the object that defines the view for the TreeWalker object. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetFirstChild(AutomationElement) | Retrieves the first child element of the specified AutomationElement. |
![]() | GetFirstChild(AutomationElement, CacheRequest) | Retrieves the first child element of the specified AutomationElement and caches properties and patterns. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLastChild(AutomationElement) | Retrieves the last child element of the specified AutomationElement. |
![]() | GetLastChild(AutomationElement, CacheRequest) | Retrieves the last child element of the specified AutomationElement and caches properties and patterns. |
![]() | GetNextSibling(AutomationElement) | Retrieves the next sibling element of the specified AutomationElement. |
![]() | GetNextSibling(AutomationElement, CacheRequest) | Retrieves the next sibling element of the specified AutomationElement and caches properties and patterns. |
![]() | GetParent(AutomationElement) | Retrieves the parent element of the specified AutomationElement. |
![]() | GetParent(AutomationElement, CacheRequest) | Retrieves the parent element of the specified AutomationElement and caches properties and patterns. |
![]() | GetPreviousSibling(AutomationElement) | Retrieves the previous sibling of the specified AutomationElement. |
![]() | GetPreviousSibling(AutomationElement, CacheRequest) | Retrieves the previous sibling of the specified AutomationElement and caches properties and patterns. |
![]() | GetType() | |
![]() | Normalize(AutomationElement) | |
![]() | Normalize(AutomationElement, CacheRequest) | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ContentViewWalker | Represents a predefined TreeWalker containing a view of elements in the tree that are marked as content controls. |
![]() ![]() | ControlViewWalker | Represents a predefined TreeWalker containing a view of elements in the tree that are marked as controls. |
![]() ![]() | RawViewWalker | Represents a predefined TreeWalker containing a view of all the elements in the tree. |
UI Automation clients view the UI Automation elements on the desktop as a set of AutomationElement objects arranged in a tree structure.
Using the TreeWalker class, a client application can navigate the UI Automation tree by selecting a view of the tree and stepping from one AutomationElement to another in a specified direction using the GetFirstChild, GetLastChild, GetPreviousSibling, GetNextSibling, and GetParent methods.
Navigating the UI Automation tree using TreeWalker can result in cross-process calls and is not as efficient as locating an element using the FindAll or FindFirst methods.
If your client application might try to find elements in its own user interface, you must make all UI Automation calls on a separate thread.
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



