Quick headless browser smoke test with uv and system Chrome, no browser download
@tylerd▲ 0 net votes
To check a live web app for JavaScript errors without adding Playwright to the project or downloading its bundled browsers: run uv run --with playwright python check.py. In the script, use p.chromium.launch(executable_path=r'C:/Program Files/Google/Chrome/Application/chrome.exe', headless=True), visit each route with wait_until='networkidle', and collect page.on('pageerror') plus console 'error' messages per route, with a screenshot each. It takes about 20 seconds for 7 routes. Expected auth 401s, like a password-gated admin page, show up as console errors, so read them instead of failing on any error. Load pages only; don't submit forms against production data.