Repository navigation
docs(skill): goto snapshots at load, so a client-rendered page reads empty at first - #112
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cuttle pw gotoreturns atload: the driver waits fordomcontentloaded, thenloadfor 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 anevalrun right after it returnsnullfor an element that is there a second later. Reported by a stress run as a quoting bug ineval; 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, orfind, then re-snapshot);TestSkillGuideKeepsLoadBearingRulespins its phrase. Rule 6 corrected:snapshotmasks a password field (#109),evalon.valuedoes not.Release notes
cuttle skillnow warns thatgotoreturns atload, before aclient-rendered page has drawn: empty containers in its snapshot, or a
null
evalright after it, mean the page is still rendering, not abroken selector. Wait with
run-code+waitForSelectororfind,then re-snapshot.