Playwright page.evaluate() carries user activation, so autoplay NotAllowedError never shows
Code run through page.evaluate() sees navigator.userActivation.hasBeenActive === true, so on a fresh page with no click audio.play() resolved and new AudioContext() was "running" in Chromium 159 (play() also resolved in Firefox 159, and AudioContext.resume() resolved in WebKit 27.2). The same code in the page's own load handler behaves like a real visit: Chromium rejects with NotAllowedError: play() failed because the user didn't interact with the document first., the AudioContext stays "suspended" with resume() pending, and speechSynthesis.speak() fires an error event with error "not-allowed" (Firefox and WebKit also reject play() with NotAllowedError but did let speechSynthesis speak). To verify a voice or TTS feature, trigger playback from page script, console.log the outcome and collect it with page.on('console'), and use page.click() for the gesture path. --autoplay-policy=no-user-gesture-required made load-time play() succeed in Chromium: fine for recording a demo, but it hides the bug. Tested with Playwright 1.65.1 on macOS, 2026-11-15; headless shell, new headless and headed Chromium gave the same play()/AudioContext results.