Flows are the heart of Autosana. A flow is a test written in natural language that describes what you want your agent to do in your app or website.Documentation Index
Fetch the complete documentation index at: https://docs.autosana.ai/llms.txt
Use this file to discover all available pages before exploring further.
What is a Flow?
A flow is a set of instructions that the agent follows to interact with your app or website. Instead of writing code or recording clicks, you simply describe what you want to test in natural language. Example Flow:Creating a Flow
Method 1: Quick Create
- Navigate to the Flows page
- Click Create Flow
- Enter a flow name (required)
- Write your instructions in natural language
- Click Create Flow
Method 2: Create in Suite
Create a flow directly within a suite:- Navigate to the Flows page
- Expand a suite
- Click Create Flow within the suite
- Follow the same steps as Quick Create
- The flow is automatically added to the suite
Writing Effective Flow Instructions
Best Practices
- Web tests auto-load the site — don’t include URLs unless you’re explicitly testing URL functionality.
- Be specific about what you’re testing, but goal-oriented for the steps in between. Test instructions should assert precisely on the behavior you care about, while describing intermediate steps at a high level. This keeps tests clear about what they verify, but flexible to future UI changes and easier to maintain.
Structure
- Action-first — start each step with an action verb (tap, click, enter, submit, verify, etc.).
- End with verification — close the flow by asserting on the behavior you actually care about.
- Bullets and multi-line steps are fine whenever they read more naturally (for example, a bulleted list of checks to run at the end of a flow).
- Avoid numbered lists — numbering locks in a rigid ordering that’s painful to update later. Use plain lines or bullets instead.
Good vs Bad Examples
BAD — vague, no assertion:Supported Agent Actions
Universal Actions (work on both mobile and web):| Action | Example Instruction |
|---|---|
| Enter Text | ”Enter ‘Joe Banana’ in the name field” |
| Clear | ”Clear the text from the email field” |
| Verify | ”Verify that ‘Welcome back!’ appears on screen” |
| Wait | ”Wait for the loading indicator to disappear” |
| Drag and Drop | ”Drag the yellow card to the ‘Drop here’ area” |
| Run Hook | ”Run ${hooks:Generate Test Order}. Then search for the returned order number” |
| Set Variable | ”Save the displayed order number as a variable called order_id” |
| Get Variable | ”Get the variable order_id and enter it in the confirmation field” |
| Action | Example Instruction |
|---|---|
| Tap | ”Tap the login button” |
| Swipe | ”Swipe right on the slider” |
| Pinch | ”Pinch to zoom in on the map until San Francisco takes up the entire screen” |
| Long Press | ”Long press on the ‘Share’ button” |
| Hide Keyboard | ”Hide the keyboard” |
| Open Deeplink | ”Open the deeplink ‘myapp://profile/123‘“ |
| Change Location | ”Change location to longitude -122.4194, latitude 37.7749” |
| Set Orientation | ”Flip the device to landscape” or “Rotate back to portrait” |
| Toggle Airplane Mode | ”Turn airplane mode on” (Android only) |
| Run Appium Script | run_appium_script {"command": "mobile: enrollBiometric", "args": {"isEnabled": true}} |
| Action | Example Instruction |
|---|---|
| Click | ”Click the login button” |
| Scroll | ”Scroll down until the settings option appears” |
| Hover | ”Hover over the dropdown menu” |
| Right Click | ”Right-click on the image” |
| Double Click | ”Double-click to edit the text” |
| Navigate | ”Navigate to https://example.com/settings” |
| Refresh | ”Refresh the page” |
| Go Back | ”Go back to the previous page” |
| Go Forward | ”Go forward to the next page” |
| Hotkey | ”Press Control+c to copy the text” |
| Run JS | ”Run JS: document.querySelectorAll('script').length and verify at least 3 scripts are loaded” |
| Run Playwright Command | run_playwright_command {"target":"page","command":"emulate_media","args":{"color_scheme":"dark"}} |
| Read Console Logs | ”Read the browser console logs and verify there are no errors” |
| Read Network Logs | ”Read the network logs and verify the POST to /api/login returned 200” |
| Read Cookies | ”Read the browser cookies and verify a session cookie exists” |
Running Flows
Running a Single Flow
- Find your flow in the Flows table
- Click the Play button (▶️)
- Select your app
- Click Run Flow
Running Multiple Flows
Select multiple flows using checkboxes:- Check the boxes next to flows you want to run
- Click Run Selected in the floating action bar
- Select your app
- Click Run Flows
Managing Flows
Editing a Flow
- Click the pencil icon (✏️) next to a flow or click on the flow row
- Modify the name or instructions
- Click Save Changes
Viewing Version History
Flows maintain a complete version history:- Click Edit on a flow
- Click the Version History tab
- View all previous versions with timestamps
- Click Revert to restore a previous version
Duplicating a Flow
To create a copy of an existing flow:- Click the three dots (⋯) next to a flow
- Select Duplicate
- A copy is created with “(Copy)” appended to the name
- Edit the duplicate as needed
Deleting a Flow
- Click the three dots (⋯) next to a flow
- Select Delete
- Confirm deletion
Organizing Flows with Suites
Suites help you organize related flows and run them together.Adding a Flow to Suites
Method 1: During Creation- When creating a flow, select which suites it should belong to
- Click the three dots (⋯) next to a flow
- Select Attach to Suite
- Check the suites you want to add the flow to
- Click Save
- Expand a suite
- Click Add Existing Flows
- Select flows to add
- Click Add Flows
Removing a Flow from a Suite
- Expand the suite containing the flow
- Click the three dots (⋯) next to the flow
- Select Remove from Suite
- Confirm removal
Flow Status and Results
Status Types
| Status | Meaning |
|---|---|
| Pending | Flow hasn’t been run yet |
| Running | Flow is currently executing |
| Passed | Flow completed successfully |
| Failed | Flow encountered an error |
Viewing Results
Click on any status badge to view detailed results:- Screenshots: Visual snapshots at each step
- Action Log: Every action performed by the agent
- Errors: Any issues encountered
- Timeline: Duration of each step
- Device Info: Device type and OS version used
Advanced Features
Attaching Files
Attach reference images to your flow instructions:
- Click the paperclip icon (📎) when creating/editing a flow
- Select files to attach
- Reference the files in your instructions: “Open the gallery and tap on
${file:smiley_face.jpg}”
Using Hooks
Hooks are reusable scripts that run before or after your flow:
Setup Hooks: Run before the flow (e.g., “Clear app data and restart”)
Teardown Hooks: Run after the flow (e.g., “Logout and clear cache”)
- Click Edit on a flow
- Click Add Hook
- Select Setup or Teardown
- Write the hook instructions
- Save the flow
Run Caching
When enabled, flows that have previously passed will use cached action sequences for faster execution (5-8x speedup). How it works:- After a flow passes successfully, the action sequence is cached
- Subsequent runs replay the cached actions with a smaller, faster model
- If the replay fails (e.g., due to UI changes), the full agent takes over
Troubleshooting
Flow Fails Immediately
Possible Causes:- App build is missing or corrupted
- Bundle ID mismatch
- App crashes on launch
- Check that your app has an active build
- Verify the bundle ID is correct
- Test the app build manually first
Agent Can’t Find Elements
Possible Causes:- UI element description is ambiguous
- Element isn’t visible on screen
- Element loads after a delay
- Be more specific in your instructions (“Tap the blue ‘Submit’ button in the bottom right”)
- Add wait instructions (“Wait for the submit button to appear”)