> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testyourappnow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Flows: Simulate Real User Interactions in Production

> A flow is a sequence of steps that simulates a real user journey in production. Build, run, and verify your critical app interactions.

A flow is an ordered sequence of steps that simulates exactly what a real user does in your application — clicking buttons, filling forms, navigating between pages, and verifying the results. Unlike a visual screenshot comparison or a unit test, a flow runs against your live production environment and proves that the entire interaction works end-to-end, not just that the page renders.

## What a Flow Contains

Every flow is made up of one or more steps. Each step represents a single user action or assertion. You can combine these step types in any order to model any real-world interaction:

| Step Type                                  | What It Does                                                                                   |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------- |
| **Navigate to URL**                        | Opens a specific URL in the test browser to begin or continue a flow                           |
| **Click element**                          | Clicks a target identified by CSS selector, visible text, or ARIA role                         |
| **Fill input field**                       | Types a value into a text input, email field, password field, or textarea                      |
| **Select dropdown option**                 | Chooses an option from a `<select>` element by its label or value                              |
| **Wait for element**                       | Pauses until a specific element appears in the DOM before proceeding                           |
| **Wait for duration**                      | Introduces a fixed pause (in milliseconds) to allow animations or async operations to complete |
| **Assert text is visible**                 | Fails the flow if a given string is not visible on the page                                    |
| **Assert element exists / does not exist** | Verifies the presence or absence of an element by selector or role                             |
| **Assert URL matches**                     | Confirms the browser is on the expected URL after navigation or a redirect                     |
| **Take screenshot**                        | Captures the current state of the page at that point in the flow for visual review             |

## Flow Status

Every flow in your dashboard has a status that reflects its most recent run result:

* **Passing** — The flow completed every step successfully on its last run. Your feature is working as expected.
* **Failing** — One or more steps failed on the last run. TYAN records which step broke, the error message, and a screenshot of the failure state.
* **Never Run** — The flow has been created but has not been executed yet. Run it manually or attach it to a monitor to get a live result.

<Note>
  Flows run against your live production URL by default. You can override the base URL per flow to target a staging environment, a preview deployment, or a branch URL — useful when verifying a feature before it ships.
</Note>

## Example: Signup Flow

Here is what a typical signup flow looks like when broken into steps:

1. Navigate to `https://yourapp.com/signup`
2. Fill the **Email** field with `test@example.com`
3. Fill the **Password** field with a test password
4. Click the **Create Account** button
5. Assert text **"Welcome to YourApp"** is visible
6. Assert URL matches `https://yourapp.com/onboarding`
7. Take screenshot

Each step maps directly to what a real user would do, which means a passing flow is proof that a real user can complete that action right now in production.

## Related Concepts

<CardGroup cols={2}>
  <Card title="Journeys" icon="route" href="/concepts/journeys">
    Chain multiple flows together into a complete end-to-end user path from entry to conversion.
  </Card>

  <Card title="Monitors" icon="clock" href="/concepts/monitors">
    Schedule any flow to run automatically and get alerted the moment it breaks in production.
  </Card>
</CardGroup>
