> For the complete documentation index, see [llms.txt](https://docs.browserflow.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.browserflow.app/reference/browserflow-commands/control-flow/loop-elements.md).

# 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"
