activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Oct 28, 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. The selectors must be full (not partial) selectors.
  • 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 or WND events - UI elements

Event typeTriggerEventArgs typeDescription
AppearedEmptyArgsEvent triggered when the target element appears.
DisappearedEmptyArgsEvent triggered when the target element disappears.
Key pressedKeyPressArgsEvent triggered when a key is pressed while focus is inside the target element.
ClickMouseClickedArgsEvent triggered when the target element is clicked.
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.3 we added support for:
  • WEBCTRL based native events in native embedded browsers (such as Slack, Discord, Electron).
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).
Web request: Before redirectWebRequestBeforeRedirectArgsEvent triggered when a server-initiated redirect is about to occur.
Web request: Before requestWebRequestBeforeRequestArgsEvent triggered when a request is about to occur.
Web request: Before send HTTP headersWebRequestBeforeSendHeadersArgsEvent triggered when a request is about to occur and the initial headers have been prepared. The event is intended to allow extensions to add, modify, and delete request headers.
Web request: CompletedWebRequestCompletedArgsEvent triggered when a web request has been processed successfully.
Web request: Error occurredWebRequestErrorOccurredArgs

Event triggered when a web request could not be processed successfully.

The web request API guarantees that for each request, either Completed or Error occurred is fired as the final event with one exception.
Web request: HTTP headers receivedWebRequestHeadersReceivedArgsEvent triggered each time that an HTTP(S) response header is received. Due to redirects and authentication requests this can happen multiple times per request.
Web request: Response startedWebRequestResponseStartedArgsEvent triggered when the first byte of the response body is received. For HTTP requests, this means that the status line and response headers are available. This event is informational and handled asynchronously. It does not allow modifying or canceling the request.
Web request: Send HTTP headersWebRequestSendHeadersArgsEvent triggered after all extensions have had a chance to modify the request headers, and presents the final version. The event is triggered before the headers are sent to the network. This event is informational and handled asynchronously. It does not allow modifying or cancelling the request.

UIA events - UI elements

Event typeTriggerEventsArgs typeDescription
AppearedEmptyArgsEvent triggered when the target element appears.
DisappearedEmptyArgsEvent triggered when the target element disappears.
Key pressedKeyPressArgsEvent triggered when a key is pressed while focus is inside the target element.
ClickMouseClickedArgsEvent triggered when the target element is clicked.
Text changedTextChangedArgsEvent triggered when the text of the target element changes.
Text selection changedUiaTextSelectionChangedArgsEvent triggered when the selected text of the target element changes.
Focus gainedEmptyArgsEvent triggered when the target element gains focus.
Focus lostEmptyArgsEvent triggered when the target element loses focus.
InvokedEmptyArgsEvent triggered when the target element gets invoked.
SelectedSelectionChangedArgsEvent triggered when the target element gets selected.
DeselectedSelectionChangedArgsEvent triggered when the target element gets deselected.
ToggledUiaToggledArgsEvent 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 activity which emitted this event (displayed as activity name).
TriggerTypeTypeThe .NET type of the trigger activity which emitted this event.

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
  • Disappeared
  • 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.

KeyPressArgs

Returns data from the following events from WND and CTRL elements:
  • Key pressed
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > KeyPressArgs
PropertyTypeDescription
KeyIntegerThe key that was interacted with.
ScanCodeIntegerThe scan code corresponding to the key that was interacted with.
KeyActionIntegerIndicates whether the key was pressed or released. Possible values:
  • 0 - key was pressed
  • 1 - key was released
KeyModifiersNKeyModifiersThe key modifier used alongside the key. Possible values:
  • None = 0
  • Alt = 1
  • Ctrl = 2
  • Shift = 4
  • Win = 8

MouseClickedArgs

Returns data from the following events from WND and CTRL elements:
  • Click
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > MouseClickedArgs
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
MouseActionIntegerIndicates whether the mouse button was pressed or released. Possible values:
  • 0 - mouse button was pressed
  • 1 - mouse button was released
KeyModifiersNKeyModifiersThe key modifier used alongside the mouse button. Possible values:
  • None = 0
  • Alt = 1
  • Ctrl = 2
  • Shift = 4
  • Win = 8

JavaKeyPressArgs

Returns data from the following events for Java:

  • Key pressed
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 for Java:

  • Click
  • Mouse pressed
  • Mouse released
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 for Java:

  • Mouse move
  • Mouse entered
  • Mouse exited
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 for Java:
  • Click
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaCellSelectedArgs
PropertyTypeDescription
RowIntegerSelected cell row.
ColumnIntegerSelected cell column.

JavaCellValueChangedArgs

Returns data from the following events for Java:
  • Click
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > JavaCellValueChangedArgs
PropertyTypeDescription
RowIntegerCell row.
ColumnIntegerCell column.
ValueStringNew value of the cell.

WebMouseEventArgs

Returns data from the following events for WEBCTRL:
  • Click
  • Double click
  • Right click
  • Mouse move
  • Mouse entered
  • Mouse exited
  • Mouse pressed
  • Mouse released
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 for WEBCTRL:
  • Key pressed
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 for WEBCTRL:
  • Text selection changed
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 for WEBCTRL:
  • Download state changed
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 for WEBCTRL:

  • Tab activated
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 for WEBCTRL:
  • Tab created
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 for WEBCTRL:
  • Tab removed
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 for WEBCTRL:
  • Tab updated
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 following events for HTML:
  • Tab navigation started
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.
TimeStampMsDouble

The time at which the tab navigation started, in milliseconds since the epoch.

The 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.
DateTimeDateThe date and time when the tab navigation started (UTC).

TabNavigationCompletedArgs

Returns data from the following events for HTML:
  • Tab navigation completed
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.
TimeStampMsDouble

The time at which the tab navigation completed, in milliseconds since the epoch.

The 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.
DateTimeDateThe date and time when the tab navigation completed (UTC).

HtmlWindowFocusChangedArgs

Returns data from the following events for HTML:
  • Window focus changed
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 following events for HTML:
  • Window bounds changed
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 following events for HTML:
  • Window created
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HtmlWindowCreatedArgs
PropertyTypeDescription
WindowIdStringThe ID of the created window.

HtmlWindowRemovedArgs

Returns data from the following events for HTML:
  • Window removed
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > HtmlWindowRemovedArgs
PropertyTypeDescription
WindowIdStringThe ID of the removed window.

WebRequestBaseArgs

Base class for Web Request events args for HTML.
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs
PropertyTypeDescription
FrameIdStringThe ID of the frame in which the request happens.
InitiatorStringThe origin where the request was initiated.
MethodStringStandard HTTP method.
ParentFrameIdStringThe ID of frame that wraps the frame which sent the request.
RequestIdStringThe ID of the request.
TabIdStringThe ID of the tab in which the request takes place.
TimeStampStringThe time when this signal is triggered, in milliseconds since the epoch.
TypeStringHow the requested resource will be used.
UrlStringThe URL.

WebRequestHeadersReceivedArgs

Returns data from the following events for HTML:
  • Web request: HTTP headers received
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestHeadersReceivedArgs
PropertyTypeDescription
ResponseHeadersStringThe HTTP response headers that have been received with this response.
StatusCodeStringStandard HTTP status code returned by the server.
StatusLineStringHTTP status line of the response.

WebResponseCacheDetailsArgs

Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestHeadersReceivedArgs > WebResponseCacheDetailsArgs
PropertyTypeDescription
FromCacheBooleanIndicates if this response was fetched from disk cache.
IpStringThe server IP address that the request was actually sent to.

WebRequestBeforeRedirectArgs

Returns data from the following events for HTML:

  • Web request: Before redirect
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebResponseCacheDetailsArgs > WebRequestBeforeRedirectArgs
PropertyTypeDescription
RedirectUrlStringThe redirect URL.

WebRequestBeforeRequestArgs

Returns data from the following events for HTML:

  • Web request: Before request
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestBeforeRequestArgs

WebRequestBeforeSendHeadersArgs

Returns data from the following events for HTML:

  • Web request: Before send HTTP headers
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestBeforeSendHeadersArgs
PropertyTypeDescription
RequestHeadersStringThe HTTP request headers that are going to be sent out with this request.

WebRequestCompletedArgs

Returns data from the following events for HTML:

  • Web request: Completed
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestHeadersReceivedArgs > WebResponseCacheDetailsArgs > WebRequestCompletedArgs

WebRequestErrorOccurredArgs

Returns data from the following events for HTML:

  • Web request: Error occurred
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestErrorOccurredArgs
PropertyTypeDescription
ErrorStringThe error description.
FromCacheBooleanIndicates if this response was fetched from disk cache.
IpStringThe server IP address that the request was actually sent to.

WebRequestResponseStartedArgs

Returns data from the following events for HTML:

  • Web request: Response started
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgsWebRequestHeadersReceivedArgsWebResponseCacheDetailsArgsWebRequestResponseStartedArgs

WebRequestSendHeadersArgs

Returns data from the following events for HTML:

  • Web request: Send HTTP headers
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > WebRequestBaseArgs > WebRequestSendHeadersArgs
PropertyTypeDescription
RequestHeadersStringThe HTTP request headers that are going to be sent out with this request.

UiaToggledArgs

Returns data from the following events for UIA:
  • Toggled events
Inheritance: TriggerArgs > UiElementTriggerArgs > NativeTriggerBaseArgs > UiaToggledArgs
PropertyTypeDescription
StateStringThe new state for the target element.

UiaTextSelectionChangedArgs

Returns data from the following events for UIA:
  • Text selection changed events
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.