Automatic Operation Skill for Playwright UI Regression Recording
Record interactions on a page you maintain, then inspect the generated playback steps and their fallback locators. It is useful for repeating checks on buttons, forms, dialogs, and navigation after a UI change.
中文Setup for Python / Playwright
Python 3.10 or later and Playwright 1.40 or later. Recording and live playback use Playwright Chromium. The example checks JSON definitions before launching a browser.
- Activate a Python virtual environment and run `python -m pip install automatic-operation-skill==2.0.0`. The project exposes `auto-recorder` and `auto-playback`.
- Run `python -m playwright install chromium` for recording and live playback. Use a local test page with sample input for the first recording.
- Place the configuration and step files in the same directory, then run `auto-playback --config path/to/skill_config.json --dry-run` to review the locator strategies.
Example task
Use a Bash terminal to create two sample files. The dry run checks step definitions and does not require a running local server.
mkdir -p auto-demo
printf '%s\n' '{"start_url":"http://127.0.0.1:8000","variables":{}}' > auto-demo/skill_config.json
printf '%s\n' '[{"step_id":"step_001","action":"click","locators":[{"strategy":"test_id","selector":"show-tips"}]}]' > auto-demo/steps.json
auto-playback --config auto-demo/skill_config.json --dry-runExpected result
The command should report one passing step. To check whether the selector matches a real element, run a separate regression on your test page with a button carrying the `show-tips` data test ID.
Upstream documentation
Original SKILL.md on GitHub · Updated
Frequently asked question
Does dry-run verify that a locator matches an element?
It checks that each step has locators and that the strategies are recognized. Live playback against your own test page verifies the match and resulting interface state.