authoring-web-scenarios

Generate deterministic JSON test scenarios from live browser exploration or natural-language descriptions.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/celikgo/webmobai --skill authoring-web-scenarios-celikgo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: authoring-web-scenarios
Source: https://github.com/celikgo/webmobai/tree/main/.claude/skills/authoring-web-scenarios
Command: npx skills add https://github.com/celikgo/webmobai --skill authoring-web-scenarios-celikgo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interactive browser testing produces one-off results that cannot be replayed in CI. This Skill converts a live exploration or a plain-English description into a reusable, deterministic JSON scenario file that the webmobai-scenario and webmobai-suite CLIs replay with the same steps in the same order on every run. ## Core Features & Use Cases - Two generation paths: Scaffold a starter scenario from the currently loaded page with webmobai_generate_scenario (no API key), or compose one from a natural-language goal with webmobai_generate_scenario_from_prompt (requires WEBMOBAI_ANTHROPIC_API_KEY). - Full step vocabulary guidance: Covers all 17 step verbs including assertions, network mocking via route, visual snapshots, storageState authentication, saveStorageState, and pauseForManual, with the constraints the generators cannot emit. - Mandatory review workflow: Replaces brittle selectors, strips credentials, adds outcome assertions, and hands off suite files and run commands for CI. - Use Case: A user walks through a checkout flow on staging and asks to turn it into a CI test. The Skill scaffolds the scenario from the live page, tightens selectors to data-testid attributes, adds assertUrl and assertText steps, and returns the JSON plus the webmobai-scenario command. ## Quick Start Ask the AI to turn the checkout flow on the current page into a reusable JSON scenario with assertions that can be replayed with webmobai-scenario in CI.

Frequently Asked Questions about authoring-web-scenarios

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

FAQPage Schema
How do I turn a browser flow into a reusable Playwright test scenario?▼

Navigate the browser to the starting page, optionally walk the flow once to confirm selectors, then call webmobai_generate_scenario to scaffold JSON from the live page. Review the draft, tighten selectors and assertions, and replay it with the webmobai-scenario CLI.

How to generate a web test scenario from a natural language description?▼

Use webmobai_generate_scenario_from_prompt with a plain-English description of the goal; it reads the current page state and returns schema-validated scenario JSON. This path requires WEBMOBAI_ANTHROPIC_API_KEY and degrades to a clean AI-disabled message without it.

Can a scenario run behind a login without scripting credentials?▼

Yes, set the top-level storageState field to a Playwright storageState file captured from a prior logged-in session instead of typing credentials in steps. The file holds live session cookies, so gitignore it and never inline its contents.

Why did my scenario pass on version 1.3.x but fail on 1.4.0?▼

Version 1.4.0 requires an explicit success prefix from assertion, route, and visualSnapshot steps instead of treating any tool response as a pass. A route mock that never installed or an assertUrl with no matcher now correctly reports the failure it always was.

What are the limitations of the scenario generators?▼

Neither generator emits storageState, saveStorageState, or pauseForManual, and the prompt-based path also drops route, viewport, browser, device, and continueOnFailure via its validation schema. Add these fields by hand during the mandatory review step.

Does pauseForManual work in headless CLI runs?▼

No, pauseForManual is a no-op in headless mode: it logs a warning, records the step as pass, and continues immediately. Since webmobai-scenario and webmobai-suite launch hardcoded headless, capture MFA sessions through the interactive headed MCP flow instead.