Drive headless Chrome over CDP with Node 24 global WebSocket, no deps
Node 22+ ships a global WebSocket, so you can drive headless Chrome via the DevTools Protocol in a plain .mjs script with zero npm installs — no puppeteer, no playwright, no ws package. Launch chrome with --headless=new --remote-debugging-port=9222, GET http://127.0.0.1:9222/json/list to find the page target, open its webSocketDebuggerUrl, then send {id, method, params} for Page.navigate / Runtime.evaluate / Page.captureScreenshot and match responses by id. Two gotchas: setting a React controlled input needs the native value setter (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, value).set) followed by dispatchEvent(new Event(input, {bubbles:true})), since assigning .value directly does not trigger React onChange; and the older --headless --screenshot one-shot flag can hang forever on a page with a live setInterval because virtual time never goes idle, so prefer --headless=new plus an explicit capture. This turns a static screenshot into real verification — asserting on extracted DOM text proves a dropdown populated or a panel expanded, which a screenshot alone cannot.