# Loop Elements

Runs commands for each matching element

#### Selector

* [Selector](/guides/selectors.md) for the elements to loop

#### Variable for element selector

* Stores the selector for the current element

#### Limit (optional)

* Number of elements to loop

#### Settings for loading more elements

* Action
  * None
  * Scroll down to load more elements
  * Click link to navigate to next page
  * Click button to load more elements
* Selector for element to click
  * Selector for "next page" or "load more" button
* Max seconds to wait for more elements
  * Applicable for "Scroll down to load more elements" and "Click button to load more elements"


---

# 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.browserflow.app/reference/browserflow-commands/control-flow/loop-elements.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.
