# How to Use XPath in ZeroWork (advanced)

As mentioned previously, ZeroWork supports both CSS and XPath selectors. In this documentation, we are mostly focusing on CSS selectors only, as they are more beginner- and intermediate-friendly. We expect more advanced users to be already familiar with how to use XPath.

TaskBots will automatically recognize an XPath selector, when it starts with double slash //. Example below.&#x20;

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

Additionally, you can also explicitly state xpath like so: `xpath=//button`.

To iterate over a list of incrementing XPath selectors, use the same syntax with loop\_index, as explained here: [Standard Loop](/using-zerowork/using-building-blocks/start-repeat/standard-loop.md#how-to-use-loop-index-syntax-to-save-lists-of-public-data). Example below.

<figure><img src="/files/uLQ8DycW29JrXCK8Dp0b" 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.zerowork.io/using-zerowork/using-selectors/how-to-use-xpath-in-zerowork-advanced.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.
