actionbook-web-test

Executes declarative YAML browser tests via Actionbook CLI and generates json-ui HTML reports.

1.6k|119|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/actionbook/actionbook --skill actionbook-web-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: actionbook-web-test
Source: https://github.com/actionbook/actionbook/tree/main/playground/actionbook-web-test
Command: npx skills add https://github.com/actionbook/actionbook --skill actionbook-web-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires js-yaml, @actionbookdev/json-ui, and includes references (resource) components.

What problem does it solve?

Writing and maintaining browser tests with frameworks like Playwright or Cypress requires significant setup and brittle selector maintenance. This Skill lets you define web tests as human-readable YAML workflows and execute them through the Actionbook CLI, with automatic selector recovery when page elements change.

Core Features & Use Cases

  • Declarative YAML Test Workflows: Define steps (open, click, fill, wait, assert) in YAML with 20+ assertion types including text, URL, element, console, network, and visual regression checks.
  • AI-Native Selector Recovery: When a selector fails, the agent snapshots the live page, finds the equivalent element, and retries the step automatically.
  • Visual HTML Reports: Generates self-contained test reports via @actionbookdev/json-ui with summary metrics, per-test step logs, and base64-embedded screenshots.
  • Use Case: Verify a login flow still works after a deployment by running a YAML workflow that fills credentials, submits the form, asserts the dashboard URL, and produces a shareable HTML report.

Quick Start

Ask the agent to run the example test file tests/reddit-ui-smoke.yaml against the live site and generate an HTML report of the results.

Frequently Asked Questions about actionbook-web-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write browser tests without Playwright or Cypress?

Define tests as YAML workflows with named steps mapping to browser actions like open, click, fill, and wait. Each step translates directly to an actionbook browser CLI command, so no test framework installation or coding is required.

How do I run a YAML web test with Actionbook CLI?

Place your YAML workflow in a tests directory and ask the agent to run it, optionally filtering by tags. The agent parses the file, executes each step as actionbook browser commands, runs assertions, and reports pass/fail results.

What happens when a CSS selector fails during a test?

The agent captures a live page snapshot with actionbook browser snapshot --interactive, locates an equivalent element in the snapshot output, and retries the failed step once with the new selector before marking the step as failed.

Does this work with Shadow DOM and iframes?

Standard CSS selectors cannot pierce Shadow DOM or cross iframe boundaries. Use the eval action with JavaScript like shadowRoot.querySelector or iframe.contentDocument.querySelector to interact with those elements, noting cross-origin iframes are inaccessible.

How are visual HTML test reports generated?

Test results are assembled into a json-ui JSON document with metrics, tables, step logs, and base64-embedded screenshots, then rendered with npx @actionbookdev/json-ui render. The output is a self-contained HTML file that works offline.

What are the limitations in browser extension mode?

The wait-idle command is unsupported, and fill/type actions fail on Web Components with Shadow DOM inputs. Workarounds include wait-fn conditions, direct value assignment via eval, or navigating to URLs with query parameters.