Skip to content

Workflows

Create and run reusable automation scripts.

Create Workflow

From Session

domguard workflow create "login-flow" --from-session <session-id>

From YAML File

domguard workflow create "checkout" --file workflow.yaml

Workflow Format

name: login-flow
description: Log into the application

steps:
  - navigate: "https://app.example.com/login"

  - wait: "input#email"

  - type:
      selector: "input#email"
      text: "user@example.com"

  - type:
      selector: "input#password"
      text: "${PASSWORD}"  # Environment variable

  - click: "button[type=submit]"

  - wait:
      text: "Welcome"

Run Workflow

# Execute workflow
domguard workflow run "login-flow"

# Dry run (preview without executing)
domguard workflow run "login-flow" --dry-run

Managing Workflows

List Workflows

domguard workflow list

View Workflow

domguard workflow show "login-flow"

Delete Workflow

domguard workflow delete "login-flow"

Variables

Use environment variables in workflows:

steps:
  - type:
      selector: "input#api-key"
      text: "${API_KEY}"

Run with:

API_KEY=secret123 domguard workflow run "api-test"

Workflow Steps

Step Example
navigate navigate: "https://..."
click click: "button.submit"
type type: { selector: "input", text: "..." }
wait wait: "div.loaded"
wait_text wait: { text: "Success" }
screenshot screenshot: "step1.png"
scroll scroll: { down: 500 }

Use Cases

  1. Login flows - Reusable authentication
  2. Data entry - Form filling automation
  3. Testing - Repeatable test scenarios
  4. Scraping - Multi-page data collection