Repository navigation
v0.21.0
v0.21.0: fewer false successes, logpoints, a11y audit
Fewer false successes: a page that failed to load, an action whose navigation failed, a fill the page didn't keep and an eval on a paused page now say so, with an exit code a script can check. New: logpoints (bdg debug), an accessibility audit, and request timing phases.
Changed behaviour
- A load that ends on Chrome's error page exits 80 (#875, #860):
bdg <url>,bdg page navigate,bdg page reloadandbdg dom wait --loadprintCould not load <url>: net::…and exit 80 (INVALID_URL) for every network error that leaves Chrome's error page (refused, DNS, TLS, redirect loop, blocked, …). Before, several of them said "Session Started" /✓ Navigatedwith exit 0. A redirect names where it led.bdg attachto a tab already on the error page still attaches (exit 0) with⚠ Page failed to loadanddata.failedLoad;bdg consolesaysPage failed to loadinstead of "No errors or warnings found". A certificate interstitial (ERR_CERT_*) stays exit 0 but prints⚠instead of✓. - An action whose navigation fails exits 80 (#880, #873):
dom click(and--double/--right,hover),dom submit,dom press-key,dom fillanddom scrollprint⚠ <Action> (navigation failed: net::…)+⚠ Could not load <url>: …instead of✓, and exit 80;--jsonis an error envelope withnavigationFailed: { url, errorText }next to the action's fields. A new page whose response never ends is not a failure:⚠ … still loading, exit 0 (dom submitused to exit 102 there).dom submiton a failed navigation is now deterministic. dom fillexits 90 when the page doesn't keep the value (#874, #867): before, exit 0 with a warning. The--jsonerror envelope carriesvalueMismatchand the fill's fields at top level. A plain number in a formatted text field now matches (8→$8.00,1234.5→$1,234.50).bdg evalon a page paused in the debugger exits 85 (#885, #857) with "The page is paused in the debugger, so the script cannot run" andResume it with: bdg cdp Debugger.resume; before, exit 102 "result too large to send" (after ~13 s when the page was already paused).bdg attachdismisses JavaScript dialogs by default (#876, #869);--dialog accept|dismisssets it.bdg <url>still accepts.bdg statusshows an attach session's dialog default.bdg dom auditruns the accessibility audit by default (#833, #455): human output gains anA11y:section,--jsongainsdata.a11y.network list --sort durationand--preset slowinclude a request still pending (#884, #861), ranked by its elapsed time and shown asPND ≥25.0s;--jsonaddspending: trueandelapsedMsfor those rows (durationunchanged). Before, the slowest request could be missing from the "slowest" list. A user-written--filter duration:is unchanged.- HAR timings include Chrome's queue time (#855):
timings.blockedandtimeinbdg network harmatchnetwork details; phases are whole milliseconds.
Added
bdg debug: logpoints (#858, #859, #848):bdg debug log <file:line> [expr…] [--if] [--max]logs values a page's code has at a line without pausing it;debug list,debug hits,debug clear; hits appear in action reports. Works on source-mapped bundles with the original file and line.bdg dom audit a11y(#833, #455): image alt text, control names, heading order, landmarks, duplicate ids, brokenaria-labelledby/aria-describedbyreferences, from the computed accessibility tree (frames and open shadow roots included).- Request timing phases in
network details(#840, #837): queued, dns, connect, tls, send, wait, download, and a verdict naming the dominant phase;--jsontimingBreakdown. bdg attach --dialog accept|dismiss(#876).
Fixed
dom fillno longer appends to a value a field puts back on focus (#871, #866): an old Telerik numeric box turned8.00into0.008.00.
Internal
BDG_ATTACH_REQUIRE_WS_URL: a test-only variable that makesbdg attachrefuse to look for a running Chrome without--chrome-ws-url(#879, #878).- CLI contract fuzzer
scripts/cli-fuzz.mjs(#882, #863), hostile test server and load-failure matrix (#872, #862). - Message modules split by command area (#854); typed CDP results throughout (#834, #841, #846); shorter and steadier smoke suites (#835, #842, #856); smoke timing trend script (#839).
Note on 1.0
The renames announced in 0.20.0 (#465) are unchanged: every old spelling still works with a Warning: and stops working in 1.0.
Install
npm install -g browser-debugger-cliFull changes: v0.20.0...v0.21.0