# 🧱 Core Activities

> **Parent page:** PAW Robot/Studio › Activities **Module:** PAWRobot (core) **Scope:** Control flow, UI interaction, data, network


---

## Overview

PAW Robot/Studio core activities are the basic activities used to control automation workflows, interact with applications and process data.

With these activities you can build conditional operations, run repeated steps using loops, invoke sub-workflows, interact with user interface elements and exchange data over JSON or HTTP.

Core activities can be grouped into the following categories:

* **Control Flow:** Condition, loop, retry on error and sub-workflow invocation operations.
* **UI Interaction:** Clicking, typing text, reading values and keyboard operations on on-screen elements.
* **Clipboard Operations:** Reading, writing and clearing clipboard data.
* **Data and Network:** Data exchange through JSON conversions and HTTP requests.

Each activity should be chosen according to the needs of the automation and the expected behavior of the workflow.


---

## Control Flow (Statements)

| Activity | Description |
|----------|-------------|
| [Add To Collection](/doc/add-to-collection-1fHYcF6Xv9) | Adds the specified item to a collection. |
| [Assign](/doc/assign-K2NqGfCzFi) | Assigns a value to a variable or target expression. |
| [Clear Collection](/doc/clear-collection-ukgh56zzsE) | Clears all items in the collection. |
| [Multiple Assign](/doc/multiple-assign-WHDvSiOsxd) | Assigns values to more than one variable or target expression in a single operation. |
| [Delay](/doc/delay-U2oNKvbWy3) | Pauses the execution of the workflow for the specified duration. |
| [Exist In Collection](/doc/exist-in-collection-qsfaFSu6lf) | Checks whether the specified item exists in the collection. |
| [Final State](/doc/final-state-4KKCxccN3p) | Represents the final state in a state machine and indicates that the state machine has completed. |
| [Flow Decision](/doc/flow-decision-MWDobHOCoy) | Evaluates a condition and directs the flow to the appropriate branch. |
| [Flow Switch](/doc/flow-switch-pM1SScgOSF) | Directs the flow to one of several possible branches based on the value of an expression. |
| [Flowchart](/doc/flowchart-eT1DqjS6ff) | Lets you design the steps of the workflow and the transitions between them as a flowchart. |
| [If](/doc/if-IEea67IKHU) | Evaluates a condition and runs one of two branches depending on the result. |
| [Invoke Method](/doc/invoke-method-mOsNRreNhj) | Calls a method on the specified object or type. |
| [No Persist Scope](/doc/no-persist-scope-dDIc9AjXTH) | Used to prevent the operations within the scope from being interrupted by persistence. |
| [Parallel](/doc/parallel-OXbcxFaI7O) | Runs multiple branches in parallel. |
| [Persist](/doc/persist-UOgeroiSCl) | Saves the current state of the workflow through the supported persistence mechanism. |
| [Pick](/doc/pick-PEleQCyU2Z) | Runs the branch whose trigger occurs among the defined triggers. |
| [Remove From Collection](/doc/remove-from-collection-bWXit1i3FJ) | Removes the specified item from the collection. |
| [Rethrow](/doc/rethrow-sOPv3JLM3U) | Rethrows a caught exception while preserving the current exception context. |
| [Sequence](/doc/sequence-NO4ThN2FWC) | Creates a workflow block in which activities run in the specified order. |
| [State](/doc/state-CUlygK1iVt) | Defines a state within a state machine and the operations belonging to that state. |
| [State Machine](/doc/state-machine-HWvEO8SWbn) | Lets you design a workflow through states and the transitions between them. |
| [Switch](/doc/switch-Usko5rezQW) | Runs the matching option among the defined options based on the value of an expression. |
| [Terminate Workflow](/doc/terminate-workflow-8kXxMgYJHy) | Terminates the execution of the workflow. |
| [Throw](/doc/throw-GjLb6g0N2d) | Creates and throws the specified error or exception. |
| [Throw Exception](/doc/throw-exception-ZV7N089AgK) | Throws a new exception of the selected exception type with the specified message. |
| [Transaction Scope](/doc/transaction-scope-Pkt9YDdrTA) | Runs a group of operations within a transaction scope. |
| [Try Catch](/doc/try-catch-ZPeiF8Fhol) | Runs operations that may cause errors and lets errors that occur be handled in Catch blocks. |
| [Write Line](/doc/write-line-EsWgSuMdoW) | Writes the specified text to the output or console area. |


---

### UI Interaction Activities

UI interaction activities let the automation perform operations through the user interface and read on-screen data.

| Activity | Description |
|----------|-------------|
| [Click Element](/doc/click-element-cmx2MPKLjj) | Clicks the defined interface element. Additional inputs such as the button and an offset that determines the click position can be used. |
| [Type Into](/doc/type-into-kELVSqrUpa) | Enters text into the specified interface element. Timeout settings can be used for finding the element and completing the operation. |
| [Type Text](/doc/type-text-YQHsgMQJKp) | Types the specified text into the active element. Make sure the correct element is active before the operation. |
| [Focus Element](/doc/focus-element-b0BvLeKdPm) | Brings the specified interface element into focus. |
| [Check Element](/doc/check-element-x9a0bhAJ8N) | Checks a checkable interface element such as a checkbox. |
| [Select Item](/doc/select-item-C8L2y77zeE) | Selects an item in a list or similar selection field by the specified key, value or index. |
| [Select Multiple Items](/doc/select-multiple-items-fKUG4o7Spt) | Selects several items in a list field that allows multiple selection, by the specified keys, values or indexes; optionally adds them to the current selection. |
| [Select Menu Item](/doc/select-menu-item-dM2KXBDf2A) | Selects the menu item with the specified value in a menu, opening the submenus on its path. |
| [Get Selected Item](/doc/get-selected-item-18MdJQ1ASo) | Returns the index, key or value of the item selected in a selection field. |
| [Get Selectable Items](/doc/get-selectable-items-AbeZdNewkQ) | Gets the available items in a selection field and produces a result that can be used in later steps. |
| [Get Element Value](/doc/get-element-value-q4SA48WyEq) | Reads the value of the specified interface element. |
| [Get Element Value With Ocr](/doc/get-element-value-with-ocr-wYEibHhXDz) | Obtains a value by reading on-screen text with OCR (Optical Character Recognition). |
| [Get Table Data](/doc/get-table-data-UAh60Ll1Tg) | Reads the data in a table in the interface and produces a result in DataTable format. |
| [Highlight Element](/doc/highlight-element-c73uPlE9dx) | Visually highlights the specified interface element. Can be used during testing and debugging to check the element's position. |
| [Move Element](/doc/move-element-mOMaJcXBfH) | Moves the specified interface element to the position defined by X and Y coordinates. |
| [Move Mouse](/doc/move-mouse-yDIFjf4JGR) | Moves the mouse pointer to the specified X and Y coordinates. |
| [Send Hotkey](/doc/send-hotkey-9tV44E23vX) | Sends the specified keyboard keys and key modifiers. |
| [Take ScreenShot](/doc/take-screenshot-OiCECRZU1h) | Takes a screenshot of the screen and produces output of type Image. |


---

### Clipboard Activities

Clipboard activities let you manage the clipboard data used in copy and paste operations between applications.

| Activity | Description |
|----------|-------------|
| [**Get Clipboard**](/doc/get-clipboard-NrMHJKPvl8) | Reads the text on the clipboard and returns it as output for use in later steps. |
| [**Set Clipboard**](/doc/set-clipboard-bDW4tXJ7f2) | Writes the specified text to the clipboard. It can then be transferred to another application with a paste operation. |
| [**Clear Clipboard**](/doc/clear-clipboard-jlRyLqFhRy) | Clears the current contents of the clipboard. |

**Warning:** Because clipboard contents can also be used by other applications, the order of clipboard operations and the need to clear the clipboard should be considered, especially when working with sensitive data.


---

### Data and Network Activities

Data and network activities let you convert structured data to JSON format, transfer JSON data back into objects and communicate with external services through HTTP requests.

| Activity | Description |
|----------|-------------|
| [**Serialize Json**](/doc/serialize-json-3na8jwigAV) | Converts an object to JSON text. Can be used when data needs to be sent in API requests or stored as text. |
| [**Deserialize Json**](/doc/deserialize-json-z0qQsSsMgA) | Converts text in JSON format to a suitable object. Makes it easier to process responses received from services. |
| [**HTTP Request Creator**](/doc/http-request-creator-c5Jht504R4) | Creates and sends an HTTP request according to the specified configuration. Can be used in scenarios such as exchanging data with REST API services. |

**Warning:** When using APIs, authentication details, request headers, HTTP status codes and error responses should be checked. Sensitive information should not be written directly into the workflow as fixed text.

#### Example usage scenario


1. A request is sent to a service with HTTP Request Creator.
2. The JSON response returned by the service is received.
3. The response is converted into a processable object with Deserialize Json.
4. The resulting data is evaluated with control flow or data processing activities.


---

### Example Scenario: Checking a Button

In this scenario, the automation checks whether the specified button exists in the interface. If the button exists, it performs the click and type operations; if not, it runs an appropriate notification or log step.

**Steps:**


1. The relevant interface element is defined.
2. Whether the element exists is evaluated with the If activity.
3. If the condition is met, the Click Element and Type Into activities run.
4. If the condition is not met, an error or information record is created in the Else branch.

This structure creates a condition-based flow instead of trying to act directly on an element that does not exist in the interface.