Help Centre › Building Processes
This article describes the RPA Browser functionality to get element attribute.
For a full list of available functions, please read BROWSER functions.
Description
The BROWSER Get element attribute function allows you to get element attribute.
Setting it up
To use the BROWSER Get element attribute function, follow these instructions:
{{popups:rpas/add:action=browser-get-attr}}
Once on a process map:
- Navigate to the process where you would like to add the BROWSER Get element attribute function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the BROWSER Get element attribute option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Element selector | Yes | Text | – | Selector to identify the element. |
| Selector type | Yes | Select | XPath | Method to locate the element. |
| Attribute | Yes | Text | – | Name of the attribute to retrieve (e.g. href, class, value). |
| Variable | Yes | Text | – | Variable to store the attribute value. |
| Scroll into view | No | Boolean | Off | Scroll to the element first. |
| Visible only | No | Boolean | Off | Only consider visible elements. |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Text | The value of the specified attribute. |
Errors
| Error | Description |
|---|---|
| Element not found | The element could not be found. |
| Attribute not found | The specified attribute does not exist on the element. |
Tips
- Common attributes: href, src, class, id, value, placeholder, title.