> For the complete documentation index, see [llms.txt](https://docs.dogq.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dogq.io/documentation/ai-powered-tools/ai-step-generator.md).

# AI Step generator

DogQ's Step generator allows you to create new steps simply by telling the AI assistant what to do in a prompt. It's designed to help you save time by reducing monotonous tasks like finding selectors and transferring them into the test editor. You can give it a command to cover a piece of your test and while it's generating new steps, you're free to multitask.

### How does it work

When you submit your prompt, DogQ runs the test to analyze the web page -  it's important that the test passes successfully. It finds the elements it needs to interact with, constructs selectors and uses them in the newly generated steps. There are however some limitations to be considered. Currently, this AI assistant can only interact with the page it is on when it receives the prompt. For bigger E2E tests covering multiple web pages, you need to use it multiple times, a page at a time.

### How to use

Step generator icon <img src="/files/iBWVjCPn5hJyVdIZkGlp" alt="" data-size="line"> is located on the last step of your test. Clicking it opens up a modal window where you can write your prompt. In the example below, it is given a web form and asked to fill it with random data to create a negative test.

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

When you click <img src="/files/RMufAOpfn3rEQxgcoeUQ" alt="" data-size="line"> DogQ runs the test and performs an analysis. Depending on the number of steps it needs to generate covering the requested actions, the process can take anywhere from 10 seconds to 5 minutes. When it's done, the new steps will be added at the end of your test.

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.dogq.io/documentation/ai-powered-tools/ai-step-generator.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.
