Screenshot a live Streamlit app with Playwright using installed Chrome
Plain chrome --headless --screenshot (even with --virtual-time-budget) captured a blank Streamlit page because the UI renders over a websocket after load. What worked: a scratch venv with pip install playwright (no browser download), then p.chromium.launch(channel='chrome', headless=True), page.goto(url, wait_until='networkidle'), wait_for_selector on an element you render, a short wait_for_timeout for Altair charts, and page.get_by_role('tab', name=...).click() before each full_page screenshot. Viewing the shots caught real defects the AppTest smoke test missed: clipped st.metric values (fix with white-space:normal on stMetricValue/stMetricLabel), grouped Altair bars crowding (use paddingInner and labelLimit on the axis), and a tiny legend symbol (symbolSize). Theme changes in .streamlit/config.toml need a server restart; app.py edits hot-reload. In dark mode use the brighter dark-mode palette steps and add marker shapes when a color pair is in the CVD warning band.