agentleFS
MathiasPaulenkoMathiasPaulenko/ai-toolkit/skills/wavexis-session-recording/SKILL.md

WaveXis Session Recording

Skill2 starsChanged 4 months agoMITView on GitHub

Record and replay browser sessions with wavexis. Interactive recording, YAML session format, replay in CI.

  • Installs packages

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Auto stop: After --timeout ms or when --stop-url is reached.

    line 67
  2. Very specific:

    Selector stop: When --stop-selector becomes visible.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WaveXis Session Recording

Description

Record and replay browser sessions with wavexis — capture real user interactions interactively, generate sessions from action lists, and replay recorded sessions in CI environments for deterministic test automation.

When to Invoke

  • Recording interactive browser sessions for testing
  • Generating session YAML from action lists
  • Replaying recorded sessions in CI
  • Converting manual testing into automated tests
  • Debugging flaky tests by replaying recorded sessions

Prerequisites

  • pip install wavexis[cdp]
  • Chrome or Edge installed
  • Basic familiarity with wavexis CLI (see wavexis-cli-automation skill)

Interactive Recording

record --interactive

Launch a browser and record all user interactions in real time:

wavexis record --interactive https://example.com --output session.yml

This opens a Chrome window. Every click, input, scroll, and navigation is captured into a YAML session file.

Interactive recording with options

wavexis record --interactive https://example.com \
    --output login-session.yml \
    --viewport 1920x1080 \
    --timeout 120000

What gets recorded

InteractionCaptured asYAML action
Clickselector + coordinatesclick
Type textselector + valueinput
NavigateURLnavigate
Scrollcoordinatesscroll
Select dropdownselector + valueselect
Key presskey namekeypress
Form submitselectorsubmit
File uploadselector + pathupload

Stopping recording

  • Manual stop: Press Ctrl+C in terminal or close the browser window.
  • Auto stop: After --timeout ms or when --stop-url is reached.
  • Selector stop: When --stop-selector becomes visible.
wavexis record --interactive https://example.com/login \
    --output session.yml \
    --stop-selector ".dashboard" \
    --timeout 60000

record --interactive options

OptionTypeDefaultDescription
--outputstrsession.ymlOutput session file
--viewportstr1280x720Browser viewport size
--timeoutint60000Max recording time in ms
--stop-selectorstrNoneStop when selector appears
--stop-urlstrNoneStop when URL matches
--headlessflagoffRecord headless (no visible window)
--stealthflagoffEnable stealth mode
--user-agentstrNoneCustom user agent
--cookiestrNonePre-set cookies (name=value)
--headerstrNonePre-set headers

Non-Interactive Recording

record with --actions

Generate a session YAML from a list of actions without launching a browser:

wavexis record https://example.com \
    --actions "navigate,click:#login,input:#username:admin,input:#password:secret,click:#submit" \
    --output login-session.yml

record from action file

wavexis record https://example.com \
    --actions-file ./actions.txt \
    --output session.yml

Action file format

# One action per line
# Format: action:selector:value

navigate:https://example.com/login
click:#username
input:#username:admin@example.com
click:#password
input:#password:secret
click:#submit
wait_for:.dashboard
screenshot:full_page

Action syntax

ActionSyntaxExample
navigatenavigate:urlnavigate:https://example.com
clickclick:selectorclick:#submit
inputinput:selector:valueinput:#email:test@example.com
selectselect:selector:valueselect:#country:US
keypresskeypress:keykeypress:Enter
scrollscroll:x:yscroll:0:500
wait_forwait_for:selectorwait_for:.results
screenshotscreenshot:modescreenshot:full_page
submitsubmit:selectorsubmit:#form
uploadupload:selector:pathupload:#file:./test.pdf

Session Replay

replay command

Replay a recorded session:

wavexis replay ./session.yml --output result.json

replay with assertions

wavexis replay ./login-session.yml \
    --assert 'url matches "https://example\.com/dashboard"' \
    --assert 'text contains "Welcome"' \
    --output result.json

replay with screenshots

wavexis replay ./session.yml \
    --screenshot \
    --output-dir ./screenshots/

replay in headless mode

wavexis replay ./session.yml \
    --headless \
    --output result.json

replay with speed control

# Slow down replay (useful for debugging)
wavexis replay ./session.yml \
    --speed 0.5 \
    --output result.json

# Speed up replay
wavexis replay ./session.yml \
    --speed 2.0 \
    --output result.json

replay options

OptionTypeDefaultDescription
--headlessflagoffRun headless
--speedfloat1.0Replay speed multiplier (0.1-10.0)
--screenshotflagoffTake screenshot after each action
--output-dirstr./output/Screenshot output directory
--assertstrNoneAssertion expression (can repeat)
--outputstrstdoutResult output file
--viewportstr1280x720Browser viewport
--stealthflagoffEnable stealth mode
--timeoutint60000Per-action timeout in ms
--stop-on-errorflagoffStop replay on first error

replay output

{
  "session": "login-session.yml",
  "actions": [
    {
      "action": "navigate",
      "url": "https://example.com/login",
      "status": "PASS",
      "time": 1234
    },
    {
      "action": "input",
      "selector": "#username",
      "value": "admin@example.com",
      "status": "PASS",
      "time": 45
    },
    {
      "action": "click",
      "selector": "#submit",
      "status": "PASS",
      "time": 120
    }
  ],
  "summary": {
    "total_actions": 3,
    "passed": 3,
    "failed": 0,
    "total_time": 1399,
    "status": "PASS"
  }
}

YAML Session Format

Basic structure

session:
  name: Login Flow
  description: Record a login session
  recorded_at: "2024-01-15T10:30:00Z"
  viewport: "1280x720"

actions:
  - navigate:
      url: https://example.com/login
      wait_until: networkidle
  - input:
      selector: "#username"
      value: admin@example.com
  - input:
      selector: "#password"
      value: secret
  - click:
      selector: "#submit"
  - wait_for:
      selector: ".dashboard"
      timeout: 10000
  - assert:
      url: "matches https://example\\.com/dashboard"
      text: "contains Welcome"
  - screenshot:
      full_page: true

Action reference

navigate

- navigate:
    url: https://example.com
    wait_until: networkidle  # load, domcontentloaded, networkidle
    timeout: 30000

click

- click:
    selector: "#button"
    button: left  # left, right, middle
    click_count: 1
    delay: 0  # ms between clicks

input

- input:
    selector: "#textfield"
    value: "text to type"
    delay: 0  # ms between keystrokes
    clear: true  # clear field before typing

select

- select:
    selector: "#dropdown"
    value: "option-value"

keypress

- keypress:
    key: Enter  # Enter, Tab, Escape, ArrowDown, etc.
    selector: "#input"  # optional: focus element first

scroll

- scroll:
    x: 0
    y: 500
    selector: ".scrollable"  # optional: scroll within element

wait_for

- wait_for:
    selector: ".results"
    state: visible  # visible, hidden, attached, detached
    timeout: 10000

screenshot

- screenshot:
    full_page: false
    selector: ".element"  # optional: element screenshot
    output: ./screenshots/page.png

assert

- assert:
    title: "== Welcome"
    url: "matches https://example\\.com"
    text: "contains Sign In"
    text: "!contains Error"

upload

- upload:
    selector: "#file-input"
    path: ./test-files/document.pdf

submit

- submit:
    selector: "#form"

CI Integration

GitHub Actions with session replay

name: Session Replay Tests

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  replay:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install wavexis
        run: pip install wavexis[cdp]

      - name: Install Chrome
        run: |
          wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
          sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
          sudo apt-get update && sudo apt-get install -y google-chrome-stable

      - name: Replay login session
        run: |
          wavexis replay ./sessions/login.yml \
            --headless \
            --assert 'url matches "https://staging\.example\.com/dashboard"' \
            --assert 'text contains "Welcome"' \
            --output login-result.json

      - name: Replay form fill session
        run: |
          wavexis replay ./sessions/form-fill.yml \
            --headless \
            --assert 'text contains "Submitted"' \
            --output form-result.json

      - name: Upload results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: session-results
          path: |
            login-result.json
            form-result.json

Environment-specific replay

# Replay against staging
wavexis replay ./sessions/login.yml \
    --base-url https://staging.example.com \
    --headless \
    --output result.json

# Replay against production
wavexis replay ./sessions/login.yml \
    --base-url https://production.example.com \
    --headless \
    --output result.json

The --base-url option replaces the recorded URL's origin with the specified base URL.

Best Practices

  • Record at the target viewport — use --viewport matching your CI environment.
  • Use stable selectors — prefer #id, [data-testid], or .class over XPath.
  • Add assertions after recording — edit the YAML to add assert actions.
  • Use wait_for between actions — ensure dynamic content is loaded before clicking.
  • Store sessions in git — version-control session YAML files.
  • Use --base-url for environment switching — don't hardcode URLs.
  • Replay headless in CI — use --headless for faster, reliable runs.
  • Use --speed for debugging — slow down replay to see what's happening.
  • Name sessions descriptively — login.yml, checkout.yml, form-fill.yml.
  • Break long sessions into shorter ones — smaller sessions are easier to debug.

Common Pitfalls

  • Selectors changed since recording — UI changes break replay; update sessions after UI updates.
  • Missing wait_for — dynamic content may not be loaded when the next action fires.
  • Hardcoded URLs — use --base-url to switch environments without re-recording.
  • Recording too much — long sessions are fragile; record focused flows.
  • Not handling popups — unexpected modals or popups can break replay.
  • Timing-dependent actions — use wait_for instead of fixed delays.
  • Headless differences — some sites behave differently headless; test with --headless before CI.
  • Speed too fast — --speed 10.0 can cause race conditions; use moderate speeds.

References

  • references/session-yaml-format.md — YAML session format specification
  • assets/templates/record-login.yml — Login recording template
  • assets/templates/record-form-fill.yml — Form fill recording template
  • wavexis CLI documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.