> For the complete documentation index, see [llms.txt](https://docs.drizz.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drizz.dev/fathom/script-generation-and-editing.md).

# Script Generation & Editing

#### Generated Script

At the end of every successful Fathom run, a test script is automatically created. The script reflects all actions taken during the execution and is immediately accessible in the editor.

The generated script includes:

1. The sequence of UI actions executed during the run
2. Conditional IF blocks detected from the intent
3. Validation commands (if defined during the run)
4. Navigation steps required to complete the scenario

#### Editing the Script

Once a script is generated, it can be reviewed and modified in the editor. Users can:

1. Review the full sequence of generated steps
2. Modify or optimize individual commands
3. Add additional validations or steps as needed

#### Saving and Reusing

Edited scripts can be saved and added to test plans for reuse in future executions. This enables teams to move from intent → execution → reusable automation in a single workflow.

Saved Fathom-generated scripts behave the same as any other test case in Drizz and can be used for regression testing or repeated runs.


---

# 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.drizz.dev/fathom/script-generation-and-editing.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.
