Activities
latest
false
Banner background image
UI Automation Activities
Last updated Mar 18, 2024

Application Event Trigger

UiPath.UIAutomationNext.Activities.NNativeEventTrigger

Description

Sets up a trigger based on a native event of any type of element (top-level window or any other indicated UI element). You can indicate the target element on screen and then choose the native event from the list of events supported by that element.

This activity is compatible with Object Repository.

The trigger must be the first activity in the workflow and the workflow is triggered when a certain UI event occurs. Only one trigger per workflow is allowed. For more details, check out Trigger-based Attended Automation.

Note:

If you are using a Studio version lower than 2023.4, you need to place the Application Event Trigger activity inside a Trigger Scope activity. In this case, the Application Event Trigger activity does not display the Scheduling mode and Enabled properties and the Scheduling mode property is available in the Trigger Scope activity.

Project compatibility

Windows - Legacy | Windows

Windows - Legacy, Windows configuration

Designer panel
  • Click Indicate target on screen to indicate the UI element to use as target.

    After you indicate the target, select the Menu button to access the following options:

    • Indicate target on screen - Indicate the target again.
    • Edit target - Open the selection mode to configure the target.
    • Remove informative screenshot - Remove the screenshot of the target application or web page.
    • Add to Object Repository - Add the current UI element to a library project, from where it can be reused throughout your automation process.
  • Event type - The list of native event types specific to the indicated element. The event type must be set. The exposed events list is dependent on the target element type and on the target application technology. For example, a web UI element might expose a different list of events than a Java UI element.

Properties panel

Common

  • Display name - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate a target.

Input

  • Match sync - Indicates whether the matching of the target element selector is done synchronously or asynchronously. It is supported only for Java events except for Appeared and Disappeared. This field supports only Boolean values. The default value is False.
  • Selectors - Optional collection of selectors to monitor for the indicated event; these selectors are monitored alongside the indicated target.
  • Target - The target element: top-level window or UI element. Only strict selectors are supported, without anchors. Target element must be set. Before indicating on screen, this field is set to (null). Once the target is indicated, all properties regarding the element that was indicated are displayed.
    • Strict selector - The strict selector generated for the target UI element. It is empty for top-level windows.
    • Window selector (Application instance) - The selector for the application window (application/browser).

Misc

  • Enabled - If set to False, the trigger starts but does not fire any events. It can be enabled later at runtime, by using the Enable Local Trigger activity. This property is hidden when the Application Event Trigger activity is placed inside a Trigger Scope. This field supports only Boolean values. The default value is True.
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports only Boolean (True, False) values. The default value is False.

Options

  • Include children - When selected, the children of the specified UI element are also monitored. It supports all event types except for Appeared or Disappeared and any UI element except for top-level windows. This field supports only Boolean (True, False) values. The default value is False.
  • Scheduling mode - It specifies how to execute the actions when a trigger is fired. Choose one of five options from the drop-down menu:
    • Sequential - Actions are executed one after another.
    • Concurrent - Actions execution can overlap.
    • OneTime - Executes one action and exits monitoring.
    • Sequential Collapse - Ignores all upcoming events, except the latest, until the current event finishes execution.
    • Sequential Drop - Stops the previous event execution and starts the next event.

    For Sequential and Concurrent modes the monitoring continues until either the user stops the execution or a Break activity is met.

Native events

About

The native events monitoring mechanism has been improved by implementing new sets of events supported by different types of application technologies:

  • WND native events

  • CTRL native events

  • JAVA native events

  • WEBCTRL native events

  • HTML native events
  • UIA native events

WND events - Top-level window

Event type

TriggerEventArgs type

Description
AppearedEmptyArgsEvent triggered when the target element appears.
DisappearedEmptyArgsEvent triggered when the target element disappears.
Title changedTextChangedArgs
Event triggered when the title of the target element changes.
Note: This is the Text changed event, renamed to Title changed for top-level windows, for more clarity.
State changedStateChangedArgsEvent triggered when the state of the target element changes.
Note: This event is triggered when something is changed in the state of the window: enabled, disabled, checked, unchecked, focusable, focused, visible, etc. The new value of the state is exposed in the arguments variable.
Location changedLocationChangedArgsEvent triggered when the target’s element location has changed.
Foreground gainedHwndArgsEvent triggered when the target’s element window becomes the foreground window.
Foreground lostHwndArgsEvent triggered when the target’s element window is no longer in foreground.
MinimizedHwndArgsEvent triggered when the target’s element window is about to be minimized.
RestoredHwndArgsEvent triggered when the target’s element window is about to be restored.

CTRL events or WND events – UI elements

Event typeTriggerEventArgs typeDescription
AppearedEmptyArgsEvent triggered when the target element appears.
DisappearedEmptyArgsEvent triggered when the target element disappears.
Text changedTextChangedArgsEvent triggered when the text of the target element changes.
Focus gainedEmptyArgsEvent triggered when the target element gains focus.
Focus lostEmptyArgsEvent triggered when the target element loses focus.
State changedStateChangedArgsEvent triggered when the state of the target element changes.
Note: This event is triggered when something is changed in the state of the window: enabled, disabled, checked, unchecked, focusable, focused, visible, etc. The new value of the state is exposed in the arguments variable.
Selection changedSelectionChangedArgsEvent triggered when the target element selection value changes.

JAVA events - UI elements

Event typeTriggerEventArgs typeDescription
AppearedEmptyArgsEvent triggered when the target element appears.
DisappearedEmptyArgsEvent triggered when the target element disappears.
Text changedTextChangedArgsEvent triggered when the text of the target element changes.
Key pressedJavaKeyPressArgsEvent triggered when a key is pressed while focus is inside the target element.
ClickJavaMouseActionArgsEvent triggered when the target element is clicked.
Mouse moveJavaMouseMotionArgsEvent triggered when the mouse is moved over the target element.
Focus gainedEmptyArgsEvent triggered when the target element gains focus.
Focus lostEmptyArgsEvent triggered when the target element loses focus.
EnabledEmptyArgsEvent triggered when the target element is enabled.
DisabledEmptyArgsEvent triggered when the target element is disabled.
Selection changedSelectionChangedArgsEvent triggered when the target element selection value changes.
Mouse enteredJavaMouseMotionArgsEvent triggered when the mouse enters the visible part of the target element.
Mouse exitedJavaMouseMotionArgsEvent triggered when the mouse exits the visible part of the target element.
Cell selectedJavaCellSelectedArgsEvent triggered when the target element is a table cell and it gets selected.
Cell value changedJavaCellValueChangedArgsEvent triggered when the target element is a table cell and its value is changed.
Mouse pressedJavaMouseActionArgsEvent triggered when any mouse button is pressed over the target element.
Mouse releasedJavaMouseActionArgsEvent triggered when any mouse button is released over the target element.
Menu selectedEmptyArgsEvent triggered when the target element is a menu and it gets selected.
Menu deselectedEmptyArgsEvent triggered when the target element is a menu and it gets deselected.
Menu canceledEmptyArgsEvent triggered when the target element is a menu and it gets canceled.
Popup menu visibleEmptyArgsEvent triggered when the target element is a popup menu and it becomes visible.
Popup menu invisibleEmptyArgsEvent triggered when the target element is a popup menu and it becomes invisible.
Popup menu canceledEmptyArgsEvent triggered when the target element is a popup menu and it gets canceled.

WEBCTRL events - UI elements

Note: Starting with UiPath.UIAutomation.Activities v23.10 we added support for WEBCTRL based native events in native embedded browsers (such as Slack, Discord, Electron).

Starting with UiPath.UIAutomation.Activities v23.12 we added support for WEBCTRL based native events in managed embedded browsers (such as CefSharp).

The Text selection changed event is supported for embedded browsers starting with UiPath.UIAutomation.Activities v23.12.
Event typeTriggerEventArgs typeDescription
AppearedEmptyArgsEvent triggered when the target element appears.
Disappeared EmptyArgsEvent triggered when the target element disappears.
Text changedTextChangedArgsEvent triggered when the text of the target element changes.
Key pressedWebKeyPressArgsEvent triggered when a key is pressed while focus is inside the target element.
ClickWebMouseEventArgsEvent triggered when the target element is clicked.
Double clickWebMouseEventArgsEvent triggered when the target element is double-clicked.
Right clickWebMouseEventArgsEvent triggered when the target element is right-clicked.
Mouse moveWebMouseEventArgsEvent triggered when the mouse is moved over the target element.
Mouse pressedWebMouseEventArgsEvent triggered when any mouse button is pressed over the target element.
Mouse releasedWebMouseEventArgsEvent triggered when any mouse button is released over the target element.
Mouse enteredWebMouseEventArgsEvent triggered when the mouse enters the visible part of the target element.
Mouse exitedWebMouseEventArgsEvent triggered when the mouse exits the visible part of the target element.
Focus gainedEmptyArgsEvent triggered when the target element gains focus.
Focus lostEmptyArgsEvent triggered when the target element loses focus.
Text selection changed WebTextSelectionChangedArgs Event triggered when the selected text of the target element changes.

HTML events - UI elements

Note: The following event types are only supported for web applications identified by <html> selectors that have only the app attribute:
  • Download state changed

  • Tab activated

  • Tab created

  • Tab removed

  • Tab updated

For now, these events are allowed only when the Window selector contains the <html> part, such as: <html app='chrome.exe' />. Other attributes such as title or url are not allowed. If the Window selector contains attributes other than app, a runtime error is generated.

Strict selector should be empty.

These event types are not supported for embedded browsers.

Event TypeTriggerEventArgs TypeDescription
Download state changed DownloadChangedArgsEvent triggered when any of a DownloadItem's properties changes.
Tab activated TabActivatedArgs

Event triggered when the active tab in a window changes.

Note: The tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
Tab created TabCreatedArgs

Event triggered when a tab is created.

Note: The tab's URL and tab group membership may not be set at the time this event is fired, but you can listen to onUpdated events to be notified when a URL is set or the tab is added to a tab group.
Tab removed TabRemovedArgsEvent triggered when a tab is closed.
Tab updatedTabUpdatedArgsEvent triggered when a tab is updated.
Tab navigation startedTabNavigationStartedArgsEvent triggered when the tab navigation to a specific URL started.
Tab navigation completedTabNavigationCompletedArgsEvent triggered when the tab navigation to a specific URL completed.
Window focus changedHtmlWindowFocusChangedArgsEvent triggered when the currently focused window changes.
Window bounds changedHtmlWindowBoundsChangedArgsEvent triggered when a window has been resized. It is only dispatched when the new bounds are committed, and not for in-progress changes.
Window createdHtmlWindowCreatedArgsEvent triggered when a window is created.
Window removedHtmlWindowRemovedArgsEvent triggered when a window is removed (closed).

UIA events - UI elements

Event typeTriggerEventsArgs typeDescription
Appeared EmptyArgsEvent triggered when the target element appears.
Disappeared EmptyArgsEvent triggered when the target element disappears.
Text changed TextChangedArgsEvent triggered when the text of the target element changes.
Text selection changedUiaTextSelectionChangedArgsEvent triggered when the selected text of the target element changes.
Focus gained EmptyArgsEvent triggered when the target element gains focus.
Focus lost EmptyArgsEvent triggered when the target element loses focus.
Invoked EmptyArgsEvent triggered when the target element gets invoked.
Selected SelectionChangedArgsEvent triggered when the target element gets selected.
Deselected SelectionChangedArgsEvent triggered when the target element gets deselected.
Toggled UiaToggledArgsEvent triggered when the target element gets toggled.

TriggerEventArgs properties

TriggerArgs
Base class for all args classes related to triggers.
PropertyTypeDescription
TriggerNameStringThe name of the trigger (displayed as activity name).
TriggerTypeTypeThe type of TriggerEventArgs.
UiElementTriggerArgs
Inheritance: TriggerArgs > UiElementTriggerArgs
PropertyTypeDescription
SelectorStringThe selector of the target element.
TargetElementUiElementThe target element that is monitored.
NativeTriggerBaseArgs
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs
PropertyTypeDescription
SelectorIndexIntegerThe index of the target element selector.
EmptyArgs

Returns data from the following events: Appeared, Disapperead, Focus gained, Focus lost, Enabled, Disabled, Menu selected, Menu deselected, Menu canceled, Popup menu visible, Popup menu invisible, Popup menu canceled.

Inheritance: TriggerArgs > UiElementTriggerArgs > EmptyArgs
TextChangedArg

Returns data from the following events: Text changed, Title changed.

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TextChangedArgs
PropertyTypeDescription
TextStringThe new text for the target element.
StateChangedArgs

Returns data from the following events: State changed.

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > StateChangedArgs
PropertyTypeDescription
StateStringThe new state for the target element.
SelectionChangedArgs

Returns data from the following events: Selection changed.

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > SelectionChangedArgs
PropertyTypeDescription
SelectionStringThe new selection for the target element.
LocationChangedArgs

Returns data from the following events: Location changed.

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs> LocationChangedArgs
PropertyTypeDescription
Location

Rectangle

Rectangle of the changed location, with information about the size of the element and its position.
HwndArgs

Returns data from the following events: Foreground gained, Foreground lost, Minimized, Restored.

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HwndArgs
PropertyTypeDescription
HwndIntPtrWindow handle.
HwndAsStringStringWindow handle as string.
JavaKeyPressArgs

Returns data from the following events: Key pressed (for Java).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaKeyPressArgs
PropertyTypeDescription
KeyCharStringThe character corresponding to the key pressed.
KeyCodeIntegerThe code corresponding to the key pressed.
ExtendedKeyCodeIntegerThe extended key code for the key pressed. Unlike KeyCode, this value depends on the current keyboard layout.
LocationStringThe location of the key that originated the event.
KeyModifiersNKeyModifiersThe key modifier used alongside the key. Possible values:
  • None = 0
  • Alt = 1
  • Ctrl = 2
  • Shift = 4
  • Win = 8
JavaMouseActionArgs

Returns data from the following events: Click, Mouse pressed, Mouse released (for Java).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaMouseActionArgs
PropertyTypeDescription
XIntegerThe X coordinate of the mouse pointer.
YIntegerThe Y coordinate of the mouse pointer.
ButtonIntegerThe mouse button that was clicked. Possible values:
  • 1 - Left
  • 2 - Middle
  • 3 - Right
ClickCountIntegerThe number of times the button was clicked.
KeyModifiersNKeyModifiersThe key modifier used alongside the mouse button. Possible values:
  • None = 0
  • Alt = 1
  • Ctrl = 2
  • Shift = 4
  • Win = 8
JavaMouseMotionArgs

Returns data from the following events: Mouse move, Mouse entered, Mouse exited (for Java).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaMouseMotionArgs
PropertyTypeDescription
XIntegerThe X coordinate of the mouse pointer.
YIntegerThe Y coordinate of the mouse pointer.
MouseButtonIntegerThe mouse button that was clicked Possible values:
  • 0 - None
  • 1 - Left
  • 2 - Middle
  • 3 - Right
JavaCellSelectedArgs

Returns data from the following events: Click (for Java).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaCellSelectedArgs
PropertyTypeDescription
RowIntegerSelected cell row.
ColumnIntegerSelected cell column.
JavaCellValueChangedArgs

Returns data from the following events: Click (for Java).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaCellValueChangedArgs
PropertyTypeDescription
RowIntegerCell row.
ColumnIntegerCell column.
ValueStringNew value of the cell.
WebMouseEventArgs

Returns data from the following events: Click, Double click, Right click, Mouse move, Mouse entered, Mouse exited, Mouse pressed, Mouse released (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebMouseEventArgs
Note: It follows the property names defined for Mouse Events.
PropertyTypeDescription
AltKeyBooleanIf the ALT key is pressed.
ButtonIntegerWhich mouse button is pressed. Possible values:
  • 0 - Left
  • 1 - Middle
  • 2 - Right
ClientXIntegerThe X coordinate of the mouse pointer (window relative).
ClientYIntegerThe Y coordinate of the mouse pointer (window relative).
CtrlKeyBooleanIf the CTRL key is pressed.
MetaKeyBooleanIf the META key is pressed.
MovementXIntegerThe X coordinate of the mouse pointer (relative to the position of the last mousemove event).
MovementYIntegerThe Y coordinate of the mouse pointer (relative to the position of the last mousemove event).
OffsetXIntegerThe X coordinate of the mouse pointer (target relative).
OffsetYIntegerThe Y coordinate of the mouse pointer (target relative).
PageXIntegerThe X coordinate of the mouse pointer (document relative).
PageYIntegerThe Y coordinate of the mouse pointer (document relative).
ScreenXIntegerThe X coordinate of the mouse pointer (screen relative).
ScreenYIntegerThe Y coordinate of the mouse pointer (screen relative).
ShiftKeyBooleanIf the SHIFT key is pressed.
WebKeyPressArgs
Returns data from the following events: Key pressed (for WEBCTRL).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebKeyPressArgs
Note: It follows the property names defined for Keyboard Events.
PropertyTypeDescription
AltKeyBooleanIf the ALT key is pressed.
CodeStringThe code of the key that triggered the event (e.g., KeyA, KeyB, ControlLeft, ControlRight).
CtrlKeyBooleanIf the CTRL key is pressed.
IsComposingBooleanIf the state of the event is composing or not.
KeyStringThe value of the key that triggered the event (e.g. a, b, Control).
LocationIntegerThe location of a key on the keyboard or device. Possible values:
  • 0 - Standard - represents almost every key on the keyboard
  • 1 - Left key was pressed
  • 2 - Right key was pressed
  • 3 - The key was pressed on the numeric keypad
MetaKeyBooleanIf the META key is pressed.
RepeatBooleanIf a key is being hold down repeatedly, or not.
ShiftKeyBooleanIf the SHIFT key is pressed.
WebTextSelectionChangedArgs

Returns data from the following events: Text selection changed (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebTextSelectionChangedArgs
Note: It follows the property names defined for Keyboard Events.
PropertyTypeDescription
AnchorClientBoundsRectangleThe anchor client bounds: information about the size of the element and its position relative to the viewport.
AnchorElementUiElementThe anchor UI element.
AnchorOffsetIntegerThe 0-based index of the character where the text selection started (from the full text of the target element).
FocusClientBoundsRectangleThe focus client bounds: information about the size of the element and its position relative to the viewport.
FocusElementUiElementThe focus UI element.
FocusOffsetIntegerThe 0-based index of the character where the text selection ended (from the full text of the target element).
SelectedTextStringThe new text selection for the target element.
DownloadChangedArgs

Returns data from the following events: Download state changed (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > DownloadChangedArgs
PropertyTypeDescription
StateStringThe string describing a change in a downloads.DownloadItem's state.
IdStringThe id of the downloads.DownloadItem that changed.
FileNameStringThe string describing a change in a downloads.DownloadItem's url.
UrlStringThe string describing a change in a downloads.DownloadItem's filename.
StartTimeStringThe string describing a change in a downloads.DownloadItem's startTime.
EndTimeStringThe string describing a change in a downloads.DownloadItem's endTime.
ErrorStringThe string describing a change in a downloads.DownloadItem's error status.
TabActivatedArgs

Returns data from the following events: Tab activated (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TabActivatedArgs
PropertyTypeDescription
TabIdStringThe ID of the tab that has become active.
WindowIdStringThe ID of the window the selected tab changed inside of.
TitleStringThe tab's new title.
UrlStringThe tab's URL if it has changed.
TabCreatedArgs

Returns data from the following events: Tab created (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TabCreatedArgs
PropertyTypeDescription
TabIdStringThe ID of the tab that has been created.
WindowIdStringThe ID of the window that contains the tab.
TitleStringThe tab's new title.
UrlStringThe tab's URL.
TabRemovedArgs

Returns data from the following events: Tab removed (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TabRemovedArgs
PropertyTypeDescription
TabIdStringThe ID of the tab that has been removed.
WindowIdStringThe ID of the window whose tab is closed.
IsWindowClosingBooleanTrue when the tab was closed because its parent window was closed.
TabUpdatedArgs

Returns data from the following events: Tab updated (for WEBCTRL).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TabUpdatedArgs
PropertyTypeDescription
TabIdStringThe ID of the tab that has been updated.
WindowIdStringThe ID of the window that contains the tab.
StatusStringThe tab's loading status.
TitleStringThe tab's new title.
UrlStringThe tab's URL if it has changed.
ActiveBooleanWhether the tab is active in its window. Does not necessarily mean the window is focused.
TabNavigationStartedArgs
Returns data from the Tab navigation started events (for html).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TabNavigationStartedArgs
PropertyTypeDescription
UrlStringThe URL currently associated with the frame, if the frame identified by the FrameId existed at one point in the given tab. The fact that an URL is associated with a given FrameId does not imply that the corresponding frame still exists.
TabIdIntegerThe ID of the tab in which the frame is.
FrameIdInteger

The ID of the frame within the tab, for which the started event was fired, resulting in tab navigation.

Frames are uniquely identified by their TabId and FrameId.
TimeStampMsDoubleThe web navigation's events' TimeStampMs property is only guaranteed to be internally consistent. Comparing one event to another event will give you the correct offset between them, but comparing them to the current time inside the extension (via (new Date()).getTime(), for instance) might give unexpected results.
DateTimeDateN/A
TabNavigationCompletedArgs
Returns data from the Tab navigation completed events (for html).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > TabNavigationCompletedArgs
PropertyTypeDescription
UrlStringThe URL currently associated with this frame, if the frame identified by the FrameId existed at one point in the given tab. The fact that an URL is associated with a given FrameId does not imply that the corresponding frame still exists.
TabIdIntegerThe ID of the tab in which the frame is..
FrameIdInteger

The ID of the frame within the tab, for which the completed event was fired, resulting in tab navigation.

Frames are uniquely identified by their TabId and FrameId.
TimeStampMsDoubleThe web navigation's events' TimeStampMs property is only guaranteed to be internally consistent. Comparing one event to another event will give you the correct offset between them, but comparing them to the current time inside the extension (via (new Date()).getTime(), for instance) might give unexpected results.
DateTimeDateN/A
HtmlWindowFocusChangedArgs
Returns data from the Window focus changed events (for html).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HtmlWindowFocusChangedArgs
PropertyTypeDescription
TabIdStringThe ID of the newly-focused tab.
WindowIdStringThe ID of the window that contains the tab.
TitleStringThe tab’s title.
UrlStringThe tab's URL if it has changed.
HtmlWindowBoundsChangedArgs
Returns data from the Window bounds changed events (for html).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HtmlWindowBoundsChangedArgs
PropertyTypeDescription
WindowIdStringThe ID of the window whose bounds have changed.
FocusedBooleanWhether the window is currently the focused window.
TopIntegerThe offset of the window from the top edge of the screen in pixels.
LeftIntegerThe offset of the window from the left edge of the screen in pixels.
WidthIntegerThe width of the window, including the frame, in pixels.
HeightIntegerThe height of the window, including the frame, in pixels.
HtmlWindowCreatedArgs
Returns data from the Window created events (for html).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HtmlWindowCreatedArgs
PropertyTypeDescription
WindowIdStringThe ID of the created window.
HtmlWindowRemovedArgs
Returns data from the Window removed events (for html).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HtmlWindowRemovedArgs
PropertyTypeDescription
WindowIdStringThe ID of the removed window.
UiaToggledArgs

Returns data from the following events: Toggled events (for UIA).

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > UiaToggledArgs
PropertyTypeDescription
StateStringThe new state for the target element.
UiaTextSelectionChangedArgs
Returns data from the Text selection changed events (for uia).
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > UiaTextSelectionChangedArgs
PropertyTypeDescription
TextRangesUiaTextRange()

Array that holds different information about the selected text elements in the target element (we can have multiple selected text elements in case non-adjacent text selection).

Each item from this array exposes the following information:

  • Text (type String) - Text selection for that selected text element. Example: TriggerEventArgs.TextRanges(0).Text represents the text of the first selected text element.
  • BoundingRectangles (type Rectangle()) - Array of bounding rectangles for the selected text element. A selected text element can have multiple bounding rectangles associated with it if it spans multiple lines.
    Each bounding rectangle is of type Rectangle {X, Y, Width, Height} and it provides information about the position and size of the element.

    Example:

    TriggerEventArgs.TextRanges(0).BoundingRectangles(0) represents the bounding rectangle of the first line in the first selected text element.

Event Inspection Tool

In the context of trigger-based attended automation, the Event Inspection Tool can be used to identify the type of native events triggered when you interact with certain UI elements in an application, and then it can be used for configuring the Application Event Trigger activity. The tool captures and monitors all the selected event types, such as Click, Key pressed, Focus gained, Focus lost, and other relevant interactions, enabling you to analyze the actions performed and, if applicable, diagnose issues.

The Event Inspection Tool can be opened from the UI Explorer, once a valid UI element is selected, by clicking the Inspect Events toolbar button.



The toolbar consists of the following options:
  • Record - The events generated by interacting with the UI element are recorded and added to the events list.
  • Pause - The events generated by the UI element when you interact with it are no longer recorded.
  • Highlight - Shows the contour of the target element and brings it to the foreground for a few seconds. The highlight stays on until it is disabled.
  • Open in UI Explorer - The monitored element is opened in UI Explorer where you can observe the selector of that element.
Once you start event recording, two more options become available:
  • Clear - Deletes all the recorded events.
  • CSV - The captured events can be exported to a .csv file for further analysis.
The Event Inspection Tool window has two main sections:
  • Event filter - Allows selecting the types of events you want to monitor for the target element.
  • Event list - Displays information about captured events.

You can filter event types to be captured by enabling or disabling the checkboxes from the list of event types. The list may vary based on the selected element technology.

All mouse event types (Mouse move, Mouse pressed, Mouse released, Mouse entered, Mouse exited), specific for Web or Java UI elements, are disabled by default because the event list, in such cases, can become quite large. Our recommendation is to enable the mouse event types only if you have a specific need to monitor them.

It is worth also mentioning that event types can be enabled or disabled even after you started the event recording.

The event list has three columns:
  • Event Name - The event type.
  • Time Stamp - The date and hour when the event was performed.
  • Event Data - The associated data and parameters for a certain event.
Each column can be sorted in ascending or descending order. The events are displayed by default in the order they were performed.


When the Disappeared event type is found, you can no longer continue monitoring and an error message is displayed on the screen. When clicking any option from the toolbar, the same error message is displayed on the screen. The only available options are to either clear the data or export it to a .csv file. To start monitoring again, close the window and open another instance of the Event Inspection Tool.


Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.