IUIAutomationTreeWalker interface

Exposes properties and methods that UI Automation client applications use to view and navigate the UI Automation elements on the desktop.

When to implement

UI Automation client applications do not implement IUIAutomationTreeWalker.

Members

The IUIAutomationTreeWalker interface inherits from the IUnknown interface. IUIAutomationTreeWalker also has these types of members:

Methods

The IUIAutomationTreeWalker interface has these methods.

MethodDescription
GetFirstChildElement

Retrieves the first child element of the specified UI Automation element.

GetFirstChildElementBuildCache

Retrieves the first child element of the specified UI Automation element, and caches properties and control patterns.

GetLastChildElement

Retrieves the last child element of the specified UI Automation element.

GetLastChildElementBuildCache

Retrieves the last child element of the specified UI Automation element, and caches properties and control patterns.

GetNextSiblingElement

Retrieves the next sibling element of the specified UI Automation element, and caches properties and control patterns.

GetNextSiblingElementBuildCache

Retrieves the next sibling element of the specified UI Automation element, and caches properties and control patterns.

GetParentElement

Retrieves the parent element of the specified UI Automation element.

GetParentElementBuildCache

Retrieves the parent element of the specified UI Automation element, and caches properties and control patterns.

GetPreviousSiblingElement

Retrieves the previous sibling element of the specified UI Automation element, and caches properties and control patterns.

GetPreviousSiblingElementBuildCache

Retrieves the previous sibling element of the specified UI Automation element, and caches properties and control patterns.

NormalizeElement

Retrieves the ancestor element nearest to the specified UI Automation element in the tree view.

NormalizeElementBuildCache

Retrieves the ancestor element nearest to the specified UI Automation element in the tree view, prefetches the requested properties and control patterns, and stores the prefetched items in the cache.

 

Properties

The IUIAutomationTreeWalker interface has these properties.

PropertyAccess typeDescription

Condition

Read-only

Retrieves the condition that defines the view of the UI Automation tree.

 

Remarks

UI Automation clients view the elements on the desktop as a set of IUIAutomation objects arranged in a tree structure. Using the IUIAutomationTreeWalker interface, a client application can navigate by selecting a view of the tree and stepping from one element to another in a specified direction using methods such as GetFirstChildElement and GetNextSiblingElement.

Navigating the tree using IUIAutomationTreeWalker can result in cross-process calls and is not as efficient as locating an element using the IUIAutomationElement::FindAll or IUIAutomationElement::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.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

DLL

UIAutomationCore.dll

IID

IID IID_IUIAutomationTreeWalker is defined as 4042c624-389c-4afc-a630-9df854a541fc

See also

CreateTreeWalker
UI Automation Element Interfaces for Clients

 

 

Community Additions

ADD
Show:
© 2014 Microsoft