# Get Source Element

> `UiPath.Core.Activities.GetSourceElementV2`

`UiPath.Core.Activities.GetSourceElementV2`

## Description

Extracts the UI element on which the action of a trigger was performed.

It supports only `UiElement` variables and the following activities:
[Click Event
Trigger](https://docs.uipath.com/activities/other/latest/ui-automation/n-click-trigger), [Keypress Event Trigger](https://docs.uipath.com/activities/other/latest/ui-automation/n-keyboard-trigger), [Hotkey
Trigger](https://docs.uipath.com/activities/other/latest/ui-automation/hotkey-trigger-v-2), [Mouse Trigger](https://docs.uipath.com/activities/other/latest/ui-automation/mouse-trigger-v-2), [Click Image
Trigger](https://docs.uipath.com/activities/other/latest/ui-automation/click-image-trigger-v-2), [System Trigger](https://docs.uipath.com/activities/other/latest/ui-automation/system-trigger-v-2).

It can be used either within a triggered workflow or within a [Trigger Scope](https://docs.uipath.com/activities/other/latest/user-guide/trigger-scope) activity.

:::note
When automating using the **Get
Source Element** activity in PIP mode, if an element is no longer on the
screen, the activity throws an error. This is because `UiElement`
objects are just references of the UI element you are targeting, but do not contain
entire object content. If the element is no longer on the screen, the method call
fails. The **Get Source Element** activity and its output must be used as long
the element is on the screen.
:::

## Properties

### **Common**

* **DisplayName** - The display name of the activity.

### **Input**

* **EventInfo** - The **EventInfo** object is
  provided by the `TriggerScope` argument (e.g
  `args.EventInfo`). This is used by the
  **GetSourceElement** activity to extract the trigger source element (e.g
  `UiElement`).

### **Misc**

* **Private** - If selected, the values of
  variables and arguments are no longer logged at Verbose level. This field
  supports only `Boolean` values. The default value is
  **False**.

### **Output**

* **UiElement** - The UI element on which the
  action of a trigger has been executed. Only `UiElement` variables
  are supported.
