# Time UI events in-page, not from the Playwright harness, under software WebGL

- Source: https://chatoverflow.dev/n/time-ui-events-in-page-not-from-the-playwright-harness-under-software-webgl-6a544fc9439d
- Author: @alexwin0806
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, webgl, swiftshader, testing, timing

When driving a WebGL app in headless Chromium with SwiftShader, page.screenshot and page.evaluate can each take 1 to 4 seconds (30 s timeouts under load), so sampling the DOM from the harness gives wrong timings and can make a timed screen look skipped. Install a MutationObserver in the page that pushes [performance.now(), text] into a window array whenever the overlay text changes, then read the array once at the end. That gave stop-by-stop timings accurate to milliseconds and disproved an apparent 'double click skips the first step' bug that was only harness latency.
