---
version: "2026.1.0"
language: "en"
---
# Get Web Attribute

The **Get Web Attribute** block retrieves the value of a specific HTML attribute from a web element, typically found using the Find Web Element block. This block only works within browser windows opened using the Start Web Browser block or one of its child windows.

It is often used to extract dynamic properties such as `href`, `src`, `alt`, `title`, or `checked` from web elements during test execution.

Fully expanded, the **Get Web Attribute** block shows the following properties:  
![image-20251113-092651.png](https://docs.leapwork.com/__attachments/a_f57e7ff318b50e92ccb42850126e40bcfbfa062922994e50552144d738fbcc50/image-20251113-092651.png?cb=e9c8de5b6e6a9ad74e5cafce354b1701)

**Note:** The screenshot on this page uses the **Elegance Design** , introduced in **2025.3**. If you are using an earlier version, your layout may look different.

## Quick-start

1. Drag **Get Web Attribute** onto the canvas.

2. Connect **Source element**.

3. Run the flow when it's ready.

## Building block parameters

Parameters  
* **Block header** : You can rename the block title ("Get Web Attribute") by double-clicking it and typing a new title.

* **Source element** : The element the attribute will be read from. This is typically connected from a previous block's **Found element** (for example from **Find Web Element** ).

* **Attribute name** : The name of the HTML attribute to retrieve from the source element (for example, `src` when the source element is an `<img>` tag).

* **Attribute value** : Contains the retrieved attribute value. This output can be connected and used in other building blocks.

* **Exists** : Returns **True** if the attribute exists and **False** if it does not. Note that some HTML attributes can exist without having a value (for example a checked checkbox can include a `checked` attribute with no value).

* **Browser window** : Makes the block use a specific browser window. Multiple browser windows are not supported by Selenium Grid or external cloud providers such as [Sauce Labs](https://saucelabs.com/) and [BrowserStack](https://browserstack.com/).

## Resources

|                                                **Topic**                                                |                                                  **Description**                                                  |
|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [Flows FAQ](https://docs.leapwork.com/faq/latest/leapwork-flow-faq/flows-faq.md)                                                 | Common questions about creating, running, and managing flows in Leapwork.                                         |
| [Flows Troubleshooting](https://docs.leapwork.com/troubleshooting/latest/leapwork-flow-troubleshooting/flows-troubleshooting.md) | Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork. |