Flow mode

Flow mode executes .flow files — plain-text scripts that describe browser user journeys step by step. Think Playwright E2E tests, but written in natural language.

.flow file format

# Comments start with #, blank lines are ignored

Navigate to https://example.com
Click "Login"
Type "[email protected]" in the email field
Type "password123" in the password field
Click the "Sign in" button
Assert the page contains "Dashboard"
Assert the URL contains "/dashboard"
Take a screenshot

Supported step types

PatternExample
NavigateNavigate to https://example.com
ClickClick "Submit" or Click the submit button
TypeType "hello" in the search field
Assert textAssert the page contains "Welcome"
Assert URLAssert the URL contains "/dashboard"
WaitWait for the page to load
ScreenshotTake a screenshot

Running a flow

slapify run path/to/test.flow
slapify run path/to/test.flow --report

CI integration

Flow mode exits with code 0 on success and non-zero on the first failed step, making it a natural fit for CI/CD pipelines:

# GitHub Actions
- name: Run smoke tests
  run: slapify run tests/smoke.flow
  env:
    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

Running multiple flows

# Run all .flow files in a directory
slapify run tests/

Steps are executed in order; a single failure stops the flow and sets the non-zero exit code.