Date fields have a CB (Choose Button) that opens a calendar, not a selection
form. fillFields detected hasPick → delegated to selectValue → error
"DLB click did not open a popup or selection form".
Fix: detect date fields by `iCalendB` CSS class on CB button (dom.mjs),
propagate `isDate` flag through field mapping, and use clipboard paste
for date fields instead of selectValue. Reference fields with CB (without
iCalendB) continue using selectValue as before.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When a 1C error modal is detected, automatically retrieve the full call
stack before throwing. Uses two strategies: Path 1 clicks the OpenReport
link for platform exceptions, Path 2 navigates hamburger → About →
Support Info for handled ВызватьИсключение errors. The stack is returned
as structured {raw, entries[{location, code}], timestamp} in the error
result. Handles unstable modal redraws with a 1.5s re-check delay.
Platform dialogs are always cleaned up via try/finally.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When the open-windows tab bar is hidden in 1C settings, the model had no
way to know how many forms are open or whether a form is modal. Now
getFormState returns openForms/formCount/modal derived from DOM form
elements (independent of tab bar), and closeForm compares form number
before/after Escape to return closed: true/false.
Tested on ncc (tab bar hidden) and bpdemo (tab bar visible).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reference fields with pick button (_CB) but no dropdown button (_DLB)
were going through the plain paste path, which silently failed for
non-editable fields. Now detected via hasPick flag in resolveFieldsScript
and delegated to selectValue (F4 → selection form).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Icon-only navigation buttons (Назад, Обновить) now match by idName fallback.
Tumbler segments (Справа/Снизу/Скрыть) collected as new kind in both
getFormState and findClickTarget.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Grid row search in findClickTargetScript used raw innerText without
norm() — missed ё→е normalization. Target was normalized but row text
was not, so "расчётным" didn't match "расчетным".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three fixes:
1. fillTableRow: match cells by column header text (headerText fallback)
when INPUT id-based fuzzy match fails due to metadata typos
2. fillTableRow: EDD filter preserves standalone enum values like "Создать"
by only filtering "Создать элемент/группу/:" patterns (was: startsWith)
3. clickElement: coordinate-based click for tabs without ID, avoiding
global [data-content] selector that picks invisible duplicates from
background forms
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Unnamed checkbox columns (no header text) now appear as "(checkbox)" in
getFormState().tables[].columns and readTable().columns. Checkbox cell
values return "true"/"false" instead of empty strings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- clickElement: add `expand` option (alias for `toggle`) for tree expand/collapse
- clickElement: fallback to dblclick when tree +/- icon not found (was NumpadAdd)
- dom.mjs: search [tree="true"] in entire line, not just first imgBox
(fixes trees with checkbox column before tree column)
- fillTableRow: detect checkbox cells after first click, return immediately
without escalation (dblclick/F4). Checkbox state detected via .select class
- SKILL.md: document `expand` instead of `toggle`
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Navigation panel: getFormState() returns `navigation` array with
form navigation links (e.g. "Основное", "Объекты метаданных").
clickElement() can now click navigation panel items (kind: navigation).
DOM: `.navigationItem` inside parent `page{N}` container.
2. --no-record: move recording stub from client-side code injection to
server-side sandbox export replacement. Stubs startRecording,
stopRecording, addNarration, showCaption, hideCaption, showTitleSlide,
hideTitleSlide as no-ops. Covers both direct calls and user wrappers
like record()/finalize().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously findClickTargetScript used querySelector (first grid only),
making clickElement unable to find rows in second+ grids on multi-grid
forms (e.g. system composition wizard). Now uses querySelectorAll to
search all visible grids, and returns gridId so the tree node handler
can locate the correct grid for expand/collapse.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents false positives like "Да" matching "Удаляемые" (group) or
"КомандаУстановитьВсе" (button). Exact and startsWith still work.
Applied to highlight groups, findClickTargetScript buttons/grid-scoped/grid rows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Button ids like allActionsРазделыКоманднаяПанель contain gridName
in the middle, not at the start. Using includes() catches both
prefix patterns (ИсходящиеКоманднаяПанель_Добавить) and infix
patterns (allActionsРазделыКоманднаяПанель).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On some forms, #title_div is on the parent group element
(e.g. form0_ГруппаБизнесПроцессы#title_div) rather than
on the grid itself. Add fallback lookup for both getFormState
and resolveGridScript.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract group title text from #title_div DOM elements so tables can be
referenced by their visible on-screen names (e.g. "Входящие") in addition
to technical attribute names. Labels appear in getFormState().tables[] and
resolveGridScript cascade matching (exact name → exact label → contains).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add semantic table binding to readTable, clickElement, fillTableRow,
and deleteTableRow — resolves the correct grid by name when a form
has multiple tables (e.g. "Входящие"/"Исходящие" in BP links).
- New resolveGridScript() in dom.mjs: cascade match by gridName → columns
- findClickTargetScript: scoped button search within grid's parent container
- getFormState: reports all grids via tables[] array (table still present for compat)
- All grids[grids.length-1] fallbacks wrapped in gridSelector ternary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
navigateSection now normalizes \r\n to spaces, so callers don't need
literal newlines in section names. fillTableRow direct-edit path skips
cells that already contain the desired value (method: 'skip').
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
checkErrorsScript falsely classified small forms (e.g. register record
form opened by "Установить статус") as error modals because they had
< 100 elements + a pressDefault button + staticText. Added input field
check — forms with editInput elements are data entry forms, not errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Forms with multiple buttons but no form{N}_Message element were
falsely detected as confirmation dialogs. Real 1C confirmations
(Да/Нет) always have a Message element. Now skip forms without it.
Fixes false positives on small EPF forms with custom buttons.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The button/link search in findClickTargetScript jumped from exact
to includes matching, causing "Поступление" to match "Поступление
билетов" instead of "Поступление (акты, накладные, УПД)" when the
shorter name appeared first in DOM order. Add startsWith step for
both name and label between exact and includes matching.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three improvements to browser automation reliability:
1. ё→е normalization: fuzzy matching now treats ё and е as equivalent
across all comparison points in both dom.mjs (norm() functions,
target variables) and browser.mjs (popup, radio, EDD, grid, confirmation
dialog, advanced search, filter badges). Prevents silent failures when
script uses ё but 1C displays е or vice versa.
2. DLB intercept handling in selectValue(): added force click + Escape
fallback when funcPanel overlay blocks the dropdown button click,
matching the pattern already used in clickElement().
3. Error handling: all exported functions now throw Error instead of
returning { error } objects. Error messages include function name,
what was searched, and available alternatives. Scenarios fail fast
at the broken step; interactive callers can use try/catch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fillFields({ 'Склад': 'value' }) now auto-resolves via DCS pair label
and auto-enables the checkbox. getFormState() returns reportSettings
array with readable names instead of raw КомпоновщикНастроек... fields.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1C platform shows some modal dialogs (e.g. "Не удалось записать") via
ps*win floating windows WITHOUT setting #modalSurface visible. Removed
the modalSurface gate from checkErrorsScript — now scans all small forms
for button patterns regardless of overlay state. The elCount > 100
threshold already filters content forms reliably.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two problems solved:
1. Server-side exceptions (ВызватьИсключение in ПередЗаписью) produce modal dialogs
AFTER the DOM stabilizes. clickElement now uses waitForSelector with MutationObserver
(doesn't block JS event loop) to detect #modalSurface or .balloon appearance.
2. checkErrorsScript used button IDs to determine form ownership, but 1C modal dialog
buttons often have empty IDs. Now uses closest('[id$="_container"]') ancestry to
group pressButtons by form, correctly separating modal buttons from background form
buttons (e.g. "Зачет оплаты" in ERP order form).
Tested with ТестОшибки CFE extension on ERP — error detected in 7.7s.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fields with 1C fill-check enabled show `required: true` in getFormState()
when empty, allowing proactive filling before posting.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- detectFormScript: lower modal threshold from >=2 to >=1 visible elements
- clickElement: force:true on third retry when surface overlay persists
- filterList/unfilterList: add SearchString pattern for selection forms
- fillTableRow: wrap body in try/catch for structured error returns
- SKILL.md: add keyboard shortcuts reference (F8, Shift+F4, F4, Alt+F)
- gitignore: exclude *.png screenshot artifacts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move browser.mjs, dom.mjs, run.mjs from external 1c-web-client-mcp
project into .claude/skills/web-test/scripts/. Now the skill is
self-contained — copy .claude/skills/ + npm install is all that's
needed.
- Add scripts/package.json with playwright dependency
- Update SKILL.md with relative runner path and setup section
- Add node_modules/ and .browser-session.json to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>