From 9318d05535efdb11c69acbac0c4393bc5dc8bfde Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 1 Mar 2026 12:25:33 +0300 Subject: [PATCH] docs(web-test): fix caption timing pattern in recording example Show caption before action with wait() pause, not after. Viewer reads what will happen, then sees it happen. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/web-test/recording.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.claude/skills/web-test/recording.md b/.claude/skills/web-test/recording.md index f52cf1e3..b189ba34 100644 --- a/.claude/skills/web-test/recording.md +++ b/.claude/skills/web-test/recording.md @@ -122,28 +122,32 @@ await showTitleSlide('Создание заказа клиента', { subtitle: await wait(4); await hideTitleSlide(); -// Steps with captions +// Steps: caption → pause → action await showCaption('Шаг 1. Переходим в раздел «Продажи»'); +await wait(1.5); await navigateSection('Продажи'); -await wait(1); await showCaption('Шаг 2. Открываем заказы клиентов'); +await wait(1.5); await openCommand('Заказы клиентов'); -await wait(1); await showCaption('Шаг 3. Создаём новый заказ'); +await wait(1.5); await clickElement('Создать'); -await wait(2); +await wait(2); // wait for form to load await showCaption('Шаг 4. Заполняем шапку'); +await wait(1.5); await fillFields({ 'Организация': 'Конфетпром', 'Контрагент': 'Альфа' }); -await wait(2); +await wait(1); await hideCaption(); const result = await stopRecording(); console.log(`Recorded ${result.duration}s, ${(result.size / 1024 / 1024).toFixed(1)} MB`); ``` +**Caption timing**: show the caption *before* the action with a `wait(1.5)` pause — the viewer reads what will happen, then sees it happen. Add `wait()` *after* the action only when the next step needs the result to load (e.g., form opening). + ## Troubleshooting | Problem | Solution |