# Attribute Value Block

<figure><img src="/files/qud4X2IPY3m6aVDGEQOw" alt=""><figcaption></figcaption></figure>

This block gets or sets the value of the specified attribute from the element.

Note

This block will not work without an active tab. Because of that, use the Active Tab block or New Tab block before using this block.

Below is a screenshot of the block settings.

<figure><img src="/files/phQ2W9FOBq4UfambGXZ8" alt=""><figcaption></figcaption></figure>

The block has two modes of operation: CSS Selector or XPatch. In the first mode, the block must receive a css selector of the page element for its operation. In the second mode, the block receives the Xpath of the element. To get a selector, you can use the Element selector tool of the Goless extension.

* Settings of the **Selector options** group:

1. **Multiple.** Multiple element selection.
2. **Mark element.** The item will not be selected if it was selected earlier.
3. **Wait for selector.** Wait for the selector to be received. When you select this element, you can enter the timeout of the selector.

The Action setting has two modes:

* **Get attribute value.** Allows you to get the attribute value.
* **Set attribute value.** Allows you to record the value of an attribute.

Below is a screenshot of the Get attribute value mode:

<figure><img src="/files/MbEwAKnoH9oUJXZKKR4A" alt=""><figcaption></figcaption></figure>

Available Get attribute value mode settings:

* **Attribute name.** Here you need to enter the attribute name. You can get the name using the Element selector tool of the Goless extension.
* **Assign to variable.** The resulting attribute value is assigned to the variable you selected.
* **Insert to table.** The resulting attribute value is inserted into the column of the table you selected.
* **Add extra row.** An arbitrary row is added to the table in the column of the table you have selected.

Screenshot of the Set attribute value mode:

<figure><img src="/files/GfJY41l2VLfOhXIrVC9e" alt=""><figcaption></figcaption></figure>

Set attribute value mode settings:

* **Attribute name.** Here you need to enter the attribute name. You can get the name using the Element selector tool of the Goless extension.
* **Attribute value.** Here you need to enter the attribute value to set its value.

### **Getting the attribute name using the Element selector tool of the Goless extension.**

In the Goless extension, we will find a tool for obtaining the element selector of a site page element.

<figure><img src="/files/z9jVlh9IKT4ZaeeXsRfi" alt=""><figcaption></figcaption></figure>

Let's select a page element and get a selector. In the screenshot below, the attribute of the element selector is highlighted on the Attributes tab. The arrow points to the attribute value, the attribute name is signed in the upper left corner.

<figure><img src="/files/nQxq4RP6bFjWI71LjHKn" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goless.com/blocks/web-interaction/attribute-value-block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
