UiaNavigate Function
Navigates in the UI Automation tree, optionally retrieving cached information.
Syntax
HRESULT UiaNavigate( HUIANODE hnode, NavigateDirection direction, UiaCondition *pCondition, UiaCacheRequest *pRequest, SAFEARRAY **ppRequestedData, BSTR *ppTreeStructure );
Parameters
- hnode
[in] The element on which the navigation begins.- direction
[in] The direction to navigate from hnode.- pCondition
[in] The condition that the element being navigated to must match. Use this parameter to skip elements that are not of interest.- pRequest
[in] The description of information to be cached.- ppRequestedData
[out] When this function returns, contains a pointer to the requested data. See Remarks. This parameter is passed uninitialized.- ppTreeStructure
[out] When this function returns, contains a pointer to the description of the tree structure. This parameter is passed uninitialized. See Remarks.
Return Value
Returns S_OK if successful or an error value otherwise.
Remarks
The tree structure is described by a string where every character is either "p" or ")". The first character in the string always represents the root node. The string is NULL if no elements are returned by the function.
A "p" represents a node (UI Automation element). When one "p" directly follows another, the second node is a child of the first. A ")" represents a step back up the tree. For example, "pp)p" represents a node followed by two child nodes that are siblings of one another. In "pp))p", the last node is a sibling of the first one.
Function Information
Stock Implementation uiautomationcore.dll Custom Implementation No Header uiautomationcoreapi.h Import library uiautomationcore.lib Minimum operating systems Windows XP