framework_eng/skills/tool-usage/browser-ui/web-test-1c/SKILL.md
Use for browser automation in 1С (navigation across sections, filling forms, reading tables and reports, filtering lists). Helps write browser tests for 1С on a semantic layer without knowing DOM details of the platform.
npx skillsauth add steelmorgan/1c-agent-based-dev-framework web-test-1cInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Semantic layer on top of Playwright for the DOM of the 1С:Предприятие web client.
cd tools/web-test && npm install
Node.js 18+. npm install will download Playwright and Chromium.
RUN="tools/web-test/run.mjs"
cat <<'SCRIPT' | node $RUN run http://erp-server:8080/mydb -
await navigateSection('Продажи');
await openCommand('Заказы клиентов');
await clickElement('Создать');
await fillFields({ 'Клиент': 'Альфа' });
await clickElement('Провести и закрыть');
SCRIPT
The URL comes from .v8-project.json (the webUrl field) or is set explicitly.
node $RUN run <url> script.js # autonomous — runs and exits
node $RUN start <url> # interactive — starts a session
cat <<'SCRIPT' | node $RUN exec - # run a script in the session
const form = await getFormState();
SCRIPT
node $RUN shot result.png # screenshot
node $RUN stop # logout + close (releases the license)
| Function | Description |
|---------|----------|
| navigateSection(name) | Go to a section (fuzzy match), returns { navigated, sections, commands } |
| openCommand(name) | Open a command from the function panel → form state |
| navigateLink(url) | Go to an object by metadata (Shift+F11), Russian names are supported |
| openFile(path) | Open EPF/ERF, handles the security dialog |
| Function | Description |
|---------|----------|
| getFormState() | All fields, buttons, tabs, tables, and errors in a single call |
| readTable({ maxRows?, offset?, table? }) | Table with pagination: { columns, rows, total }. table selects the grid by name |
| readSpreadsheet() | Report (SpreadsheetDocument) after “Generate”. Supports text-only and reports with numeric headers |
getFormState() returns: fields (name, value, actions, required), table (back-compat: first grid), tables[] (all visible grids: {name, columns, rowCount, label}), openForms[], formCount, modal, openTabs[], navigation (form navigation panel), reportSettings (human-readable СКД settings), errors.stateText (info-bar SpreadsheetDocument), errorModal, confirmation.
Tree rows are marked _kind: 'group'|'parent', _tree: 'expanded'|'collapsed', _level, _selected.
| Function | Description |
|---------|----------|
| fillFields({ name: value }) | Fill fields (fuzzy match, auto-type: catalog/checkbox/radio) |
| fillField(name, value) | Single-field version of fillFields |
| selectValue(field, search, opts?) | Choose from a catalog (dropdown / selection form) |
| clickElement(text, opts?) | Click a button/link/row. opts: dblclick, table (scope the command panel to a specific grid), toggle/expand (tree), modifier: 'ctrl'\|'shift' (multi-select), timeout |
| clickElement(target, opts?) with {row, column} | Drill down in SpreadsheetDocument: {row: 0, column: 'К6'}, {row: {'К1': 'Материалы'}, column: 'К6'}, {row: 'totals', column: 'К6'} |
| fillTableRow(fields, opts) | Fill a tabular-section row ({ tab, add, row, table }) |
| deleteTableRow(row, { tab?, table? }) | Delete a row |
| filterList(text, opts?) / unfilterList() | Filter lists (simple / { field }) |
| closeForm({ save? }) | Close with confirmation handling |
| switchTab(name) | Switch the form tab or an open tab (tab bar) |
| navigateLink(url) | Open an object by metadata (Shift+F11), Russian names are supported |
| openFile(path) | Open EPF/ERF through File→Open with security dialog handling |
| Function | Description |
|---------|----------|
| screenshot() | PNG screenshot |
| wait(seconds) | Wait + form state |
| getPage() | Playwright Page (non-standard scenarios) |
| startRecording(path, opts?) / stopRecording() | Video recording (can be disabled at the CLI level with --no-record) |
| addNarration(videoPath, opts?) | Overlay TTS narration (node-edge-tts) |
| showCaption(text, opts?) / hideCaption() | Caption over the video |
| showTitleSlide(text) / hideTitleSlide() | Title slide |
| showImage(path, opts?) / hideImage() | Image overlay |
| highlight(text, opts?) / unhighlight() / setHighlight(on) | Highlight elements |
| fetchErrorStack(formNum, hasReport) | Extract the call stack from the 1C error modal |
| getSections() / getCommands() | Section panel |
page.fill() — 1C reacts only to trusted eventsё is normalized to е and \u00a0 to a space automaticallystop → POST /e1cib/logout (releases the license)fetchErrorStack) and screenshot are pulled automaticallytables[] lists them all; pass { table: 'Outgoing' } to readTable/clickElement/fillTableRow/deleteTableRow to select the right one{expand: true} expands/collapsesclickElement(..., { modifier: 'ctrl' }) or 'shift'extensionPath in .v8-project.json| Key | Context | Action |
|---------|----------|----------|
| F8 | Reference field | Create a new element |
| Shift+F4 | Reference field | Clear the value |
| F4 | Reference field | Open the selection form |
| Alt+F | List/table | Advanced search |
When you need to cover a 1C solution with a series of automated tests — running multiple .test.mjs scenarios in sequence, aggregating results, retrying flaky cases, screenshots on failures, Allure/JUnit reports — switch to test mode. More details: regress.md.
By default, use run/exec for one-off automation — test is a specialized mode for project-wide coverage.
Two paths in priority order:
1. Vanessa Automation (recommended) — if the scenario is described in a .feature file. Vanessa records the run video and generates subtitles from Gherkin steps out of the box. Configured via a profile (ЗаписыватьВидео, ГенерироватьСубтитры, ПутьКВидеозаписям). Use for demo videos for the team and for documenting business processes.
2. Playwright fallback — when Vanessa is unavailable, headless is needed, or the scenario is written in JS. API: startRecording / stopRecording / showCaption / addNarration (TTS via node-edge-tts, OpenAI, or ElevenLabs). Requires ffmpeg.
More details: recording.md — comparison table, Vanessa profile parameters, full Playwright recording API, examples, troubleshooting.
depends_on: [] requires:
testing
MUST use BEFORE making a judgment about the cause of a conflict, a test failure, or an artifact dispute. Defines the end-to-end verification method L1→L6 and the classification of the first broken link.
development
MUST use AFTER a work cycle with ≥2 iterations (wrote → error → fixed → success). Provides the retrospective procedure and the format for recording practice/anti-patterns in references/learned-patterns.md or {project}/.context/learned-patterns.md.
tools
MUST use WHEN you are writing reusable knowledge into RLM (pattern / architectural decision / stable domain fact) OR reading it before a non-trivial task/solution in the domain. Provides the breakdown of native-push vs RLM-pull, tools for writing and reading RLM, H-MEM levels, and hygiene.
testing
MUST use WHEN the task is classified as simple (< 20 lines, 1 file, no new metadata objects, no architectural decisions). Provides a short cycle of 3 steps with a guard on the self path and mandatory verify.