UiNode - spectrum968/UiPath GitHub Wiki
What is UiNode object?
UiNode has been designed with the goal to allow an app to programmatically manipulate user interface objects belonging to other apps. While UI elements come in many flavors from many frameworks (just to name a few: win32, java, WPF, silverlight, flash) UiNode aims to be a uniform and simple UI automation and scraping interface to the myriad of UI objects you see on your screen.
Table of Contents
What is UiNode object? Methods Properties Attributes Events Constants UiClickType UiFindScope UiInputMethod UiMouseButton UiRelativeTo UiSelectionType UiVisibilityLevel UiWaitForReadyLevels Error Codes Methods
Properties
Attributes
Events
UiNode exposes only one event:
event IUiNodeEvents_CancelEventHandler Cancel delegate void IUiNodeEvents_CancelEventHandler(out bool cancel) Cancel event occurs repeatedly during time consuming operations: FindFirst, FromSelector, WaitImage, WaitPage. It gives the users a chance to cancel a long operation.
To cancel the current processing you have to set cancel out parameter to true in your event handler function. The current operation will raise a E_UINODE_CANCELED_ERR error.
For more info check this Events Tutorial.
Constants
UiClickType
Enumeration type that specifies the type of mouse click in Click method.
UI_CLICK_SINGLE = 0 a "single click" action is performed
UI_CLICK_DOUBLE = 1 a "double click" action is performed
UI_CLICK_DOWN = 2 a "click down" action is performed
UI_CLICK_UP = 3 a "click up" action is performed
UiFindScope
UiFindScope enumeration type specifies the search scope of FindAll and FindFirst methods.
UI_FIND_CHILDREN = 0 only direct children of the current node are taken into account
UI_FIND_DESCENDANTS = 1 all descendants are considered
UI_FIND_TOP_LEVELS = 2 search for top level windows only
UI_FIND_PROCESS = 3 search among the nodes which belong to the same process as the current node
UI_FIND_THREAD = 4 search among the nodes which belong to the same thread as the current node
UiInputMethod
UiInputMethod enumeration specifies how Click, Hover and WriteText methods simulate keyboard and mouse events.
UI_HARDWARE_EVENTS = 0 keystrokes and mouse events are synthesized by SendInput function
UI_WIN32_MSG = 1 WM_LBUTTONDOWN, WM_LBUTTONUP and WM_CHAR Win32 messages are used
UI_CONTROL_API = 2 the underlying technology of the node is used to generate events (like Active Accessibility, Java Accessibility Bridge, HTML events)
UiMouseButton
UiMouseButton enumeration type specifies the mouse button in Click method.
UI_BTN_LEFT = 0 left mouse button is clicked
UI_BTN_RIGHT = 1 right mouse button is clicked
UI_BTN_MIDDLE = 2 middle mouse button is clicked
UiRelativeTo
UiRelativeTo enumeration specifies the anchor point used to find other elements by their position relative to current element; see FromRelativePoint.
UI_REL_TO_TOPLEFT = 0 UI_REL_TO_TOPRIGHT = 1 UI_REL_TO_BOTTOM_LEFT = 2 UI_REL_TO_BOTTOM_RIGHT = 3 UI_REL_TO_CENTER = 4 UiSelectionType
UiSelectionType enumeration specifies the type of selection in SelectInteractive method.
UI_SELECT_NODE = 0 select a user interface object.
UI_SELECT_REGION = 1 select a rectangular region from which a UI object is inferred
UiVisibilityLevel
UiVisibilityLevel enumeration specifies the visibility of a UI object as follows:
UI_VISIBILITY_VISIBLE = 0 the UI object is completely visible.
UI_VISIBILITY_HIDDEN = 1 the UI object is not visible on the screen; it is programmatically hidden or minimized.
UI_VISIBILITY_OFFSCREEN = 2 the object is clipped or has scrolled out of view, but it is not programmatically hidden.
UI_VISIBILITY_PARTIAL = 3 the object is partially covered by another window.
UiWaitForReadyLevels
UiWaitForReadyLevels enumeration specifies the wait for ready level for WaitForReady method and waitForReadyLevel property.
UI_WFR_NONE = 0 no wait at all
UI_WFR_INTERACTIVE = 1 wait the node to become interactive
UI_WFR_COMPLETE = 2 wait the node to be completely available.
Error Codes