# Using the Step Editor to Build Tests

:::lead
The Step Editor is where you build, edit, and organise your automated tests. Every Test Case and Flow opens in the same visual editor, so you can create and maintain tests without writing code.
:::

## Opening the editor

- **New test:** click **New Test** on the **Tests** page, or **New Test Case** inside a suite.
- **Existing test:** click a test's name (or use the search).
- **Flows:** click **New Flow** on the **Flow** page, or open an existing Flow.

## Editor overview

![Step Editor overview](/images/building-tests/step-editor/step-editor-overview.png)

The editor has three main areas:

- **Step Palette** (left) — search **Blocks & Flows** and browse every step type, grouped by category, plus your saved Flows. Drag a step into the test, or click it to add it at the end.
- **Step Tree** (centre) — your test, from top to bottom in the order it runs. Reorder steps by dragging them.
- **Properties Panel** (right) — the settings for the selected step.

At the top, the header shows the test's **name and description**, along with its **Suite**, **Priority**, and **Status**. Click the title area to change them.

## Saving

Click **Save** to store your changes. A Test Case needs a name and a suite before it can be saved. Click **Cancel** to leave without saving.

If you try to leave the page with unsaved changes, TestOwl asks you to confirm so you don't lose your work.

Each Test Case, and each Suite, has a **Status** you choose in its details:

- **Draft** — still being built or reviewed.
- **Active** — ready for regular execution.
- **Archived** — kept for reference. Archived tests can't be run.

See [Test Cases](/docs/building-tests/test-cases) for what each status means when running.

## Adding steps

There are two ways to build a test:

- **Record** a journey with the [Recorder](/docs/building-tests/recording-a-test), or use **Edit using Recorder** in the editor header to re-open an existing test in a live browser and keep recording into it.
- **Drag steps** from the Step Palette into the Step Tree.

The palette contains the full [Step Library](/docs/building-tests/step-library) — navigation, mouse and keyboard actions, form input, assertions, waits, control flow, API requests, network interception, database queries, data and variable handling, cookies and storage, and more. Type in the search box to find a step by name rather than browsing.

## Organising your test

In the Step Tree you can:

- **Drag and drop** steps to reorder them.
- **Move steps** into or out of container steps.
- **Nest steps** inside control-flow steps such as **If / Else**, **For Loop**, **While Loop**, and **Retry Block**.
- Drag a reusable [Flow](/docs/building-tests/flows) into your test. It shows as one collapsible block.

Changes are reflected immediately.

## Editing step properties

Click a step to open its settings in the **Properties Panel**. What you see depends on the step, but almost every step has:

- **Name** and **Description**
- **On Failure** — *Fail Immediately*, *Continue But Fail Test*, or *Warn But Continue Execution*
- **Use Smart Timeout**, or a fixed **Timeout Value** in milliseconds

Steps then add their own fields — for example the element to act on, the text to type, or the value to expect. See the [Step Library](/docs/building-tests/step-library) for every step.

### Using Variables and Secrets

Most input fields can use a [Variable](/docs/data/variables) or [Secret](/docs/data/secrets) instead of a typed value. Click the **Select from Variable or Secret** button next to a field to open the picker, which has three tabs:

- **Step Variables** — values created or extracted by earlier steps in this test.
- **Variables** — your project's Variables.
- **Secrets** — your project's Secrets (values are never shown).

You can also type a reference directly:

```text
{{username}}
{{password}}
{{baseUrl}}
```

### Conditions

**While Loop** and **Repeat Until** use a condition builder: a left value, an operator (`==`, `!=`, `<`, `<=`, `>`, `>=`, contains, starts with, ends with, matches), and a right value. Either side can be a variable.

**If / Else** works a little differently. You first pick a **Condition Type**, and its own fields appear below it:

- **Element Visible** / **Element Hidden** — a selector to check.
- **Variable Equals** — a variable and the value to compare it against.
- **Text Appears** — text to look for, with an optional regex flag.
- **URL Changes** — a URL pattern and how it should match.
- **Custom Expression** — falls back to the same left value / operator / right value builder used by While Loop and Repeat Until, for anything the presets above don't cover.

### Picking an element on the page

Where a step targets an element, the **Pick element** button lets you click the element in a live page instead of typing a selector. Element picking is available while recording with the Desktop App.

## Working with multiple steps

Use the selection checkboxes to select several steps. You can then:

- **Delete** the selected steps.
- **Create a Flow** from them — turning a sequence you use often into a reusable [Flow](/docs/building-tests/flows).

## Running from the editor

Click **Run** in the header to run the test you're editing. Choose the environment, URL, headless option, and Local or Cloud, exactly as in [Triggering a Run](/docs/running-and-results/triggering-a-run).

## Next steps

::::cardgrid
:::card{title="Recorder" href="/docs/building-tests/recording-a-test"}
Create tests by recording user interactions.
:::

:::card{title="Step Library" href="/docs/building-tests/step-library"}
Browse every step you can add.
:::

:::card{title="Flows" href="/docs/building-tests/flows"}
Create reusable sequences of steps shared across tests.
:::

:::card{title="Variables" href="/docs/data/variables"}
Reuse dynamic values across your tests without hardcoding.
:::
::::
