Skip to content

docs(skill): goto snapshots at load, so a client-rendered page reads empty at first - #112

Merged
tenequm merged 2 commits into
mainfrom
fix/pw-goto-settle-and-eval-quoting
Sep 19, 2026
Merged

tenequm merged 2 commits into
mainfrom
fix/pw-goto-settle-and-eval-quoting

Conversation

@tenequm

@tenequm tenequm commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

What

cuttle pw goto returns at load: the driver waits for domcontentloaded, then load for at most 5s (error swallowed), and snapshots at once - no network-idle and no option to ask for one. A client-rendered page therefore reads as empty containers in the goto snapshot, and an eval run right after it returns null for an element that is there a second later. Reported by a stress run as a quoting bug in eval; it is timing - nested quotes pass through intact on every backend.

SKILL.md gains Gotcha 7 naming the symptom and the wait (run-code + waitForSelector, or find, then re-snapshot); TestSkillGuideKeepsLoadBearingRules pins its phrase. Rule 6 corrected: snapshot masks a password field (#109), eval on .value does not.

Release notes

cuttle skill now warns that goto returns at load, before a
client-rendered page has drawn: empty containers in its snapshot, or a
null eval right after it, mean the page is still rendering, not a
broken selector. Wait with run-code + waitForSelector or find,
then re-snapshot.

…empty at first

The bundled driver's goto waits for domcontentloaded, then load for at
most 5s, and snapshots at once - no network-idle and no option for one.
A snapshot or eval straight after it sees the pre-render DOM: empty
listitems, a null querySelector for an element that exists a second
later. Reproduced against a local page that fills its list 3s after
load; the same nested-quote eval returns null at once and the node 4s
on, so the quoting report was this timing, not an escaping layer -
cuttle passes the argument verbatim on every backend and the driver
evaluates it intact. One gotcha names the symptom and the wait form.
@tenequm
tenequm merged commit 8f5ec76 into main Sep 19, 2026
9 checks passed
@tenequm
tenequm deleted the fix/pw-goto-settle-and-eval-quoting branch September 19, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant