feat(web-test): highlight groups fix, recording auto-stop, fillField alias

- highlight(): exact match by name ignores size filter (supports Representation=None groups),
  error message lists available elements by category
- startRecording(): { force: true } option to restart if already recording
- executeScript(): auto-stop recording on script error (prevents "Already recording")
- fillField(name, value): silent alias for fillFields({ name: value })

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-15 15:37:21 +03:00
parent e3a9be0036
commit ca681676b4
3 changed files with 82 additions and 17 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env node
// web-test run v1.1 — CLI runner for 1C web client automation
// web-test run v1.2 — CLI runner for 1C web client automation
// Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
/**
* CLI runner for 1C web client automation.
@@ -131,7 +131,7 @@ async function executeScript(code, { noRecord } = {}) {
// Wrap action functions to auto-detect 1C errors (modal, balloon)
// and stop execution immediately with diagnostic info
const ACTION_FNS = [
'clickElement', 'fillFields', 'selectValue', 'fillTableRow',
'clickElement', 'fillFields', 'fillField', 'selectValue', 'fillTableRow',
'deleteTableRow', 'openCommand', 'navigateSection', 'navigateLink', 'openFile',
'closeForm', 'filterList', 'unfilterList'
];
@@ -162,6 +162,11 @@ async function executeScript(code, { noRecord } = {}) {
console.log = origLog;
console.error = origErr;
// Auto-stop recording if active (prevents "Already recording" on next exec)
if (browser.isRecording()) {
try { await browser.stopRecording(); } catch {}
}
// Error screenshot
let shotFile;
try {