Skip to main content
Automate works best when you give it enough context to understand what you want and where to put it. It supports two ways of working:

Autonomous creation

No human in the loop. Front-load all the context into one prompt, hit run, and review the finished flow.

Guided creation

A copilot workflow. Prompt for one small change at a time, discovering the app together with the AI.
Both modes benefit from context you write down once. If you find yourself repeating the same background across sessions, put it in a SKILL.md.

Autonomous creation

In this mode Automate works unattended, so everything it needs to know has to be in the prompt before you hit run.

Write a specific prompt

Vague prompts produce unreliable results. A prompt like “Create a test for the rate quote flow” gives Automate very little to work with. A stronger prompt includes:
  • Where to start (URL and login credentials)
  • What the user does, step by step
  • What a successful outcome looks like
  • Anything specific you want asserted
Example:

Include assertions explicitly

If there’s something specific you need verified, say so. Automate won’t always infer what matters to you — telling it what to assert produces more useful tests. If a flow depends on setup that is only explained in your documentation, include the link in the flow description or your prompt. The AI reads linked documentation before it starts building and uses it to complete configuration steps it cannot discover from the UI alone.

Structure the flow header around Arrange, Act, Assert

When Automate completes a flow on its own, the comment block at the top of the flow is its specification. Structuring that header around Arrange, Act, Assert tells Automate how far each verification should go. For example, a flow that disables a feature could simply reload the page and check that the toggle is still off. It could also go further and sign in as a different user to verify the feature is no longer accessible. An AAA header states which one you want, so Automate doesn’t have to guess:

Use descriptive flow names

Before building a new flow, the AI searches your workspace for similar flows and reuses the parts that overlap instead of starting from scratch. Descriptive names help it find the right ones. If you want it to work from a specific example, point it at a working reference.

Guided creation

In this mode you stay in the loop, hand-holding Automate to completion. Use it when you don’t have the full context yourself and are discovering the app at the same time as the AI, so it makes sense to work the problem together.

Start prompts with “Insert code to”

When adding code at a specific point in a test, beginning your prompt with “Insert code to” helps Automate understand it should add rather than replace.

Control where code is inserted

Automate inserts code relative to the current cursor position. If code ends up in the wrong place:
  • Click on the line where you want the code inserted before prompting
  • Or tell it explicitly: “Insert code on line 42 to…”

Describe elements in plain language

You don’t need to tell Automate which Playwright locator to use. It’s better at finding the most relevant locator itself. If you prescribe a locator and it turns out not to work, Automate gets stuck between obeying your instruction and producing a working test, and the result suffers. Say “Click the Save button in the billing settings panel”, not “Click page.locator('#btn-save-2').

Hover before you prompt for elements

When targeting an element inside a container — for example, the first link within a specific panel — hover over the container for a second, then click the element. This gives Automate locators for both, and you can ask it to chain them:
If you hover only on the element itself, Automate may use a less precise locator.

Trigger actions before prompting

For interactions that produce a result (a download, a new page, a modal), trigger the action yourself first and let it complete. Then tell Automate what happened. This helps it understand the outcome, not just the selector. Example:
  1. Click the download button and wait for the download to start
  2. Then prompt: “Click the download button”

Use descriptive language for context

A few phrases that help Automate understand what it’s working with:
  • “in the row” — when an element is inside a table row
  • “file” — for file-related actions like clicking download or handling file inputs

Refactor whole-file changes

For changes that apply across the entire test — updating all comments, removing hardcoded values, renaming variables — use “refactor” to signal that the change is global:

Move code by selecting it first

If you need Automate to move a block of code, select all the lines you want moved before prompting. This removes ambiguity about what should be relocated.

Fix errors directly

If a run produces an error, you can ask Automate to address it without explaining the cause:
Automate will read the error output and attempt a fix.

Point Automate at a working reference

If you have a working example that you want Automate AI to follow, simply give it the path to that file and tell it what you’d like it to copy.
This will prevent having to re-describe the change each time.
Last modified on August 14, 2026