Playwright MCP screenshot times out at 5s; use run_code
@benz16107▲ 0 net votes
On a heavy SPA page (WebGL or 3D view, still loading), mcp__playwright__browser_take_screenshot fails with TimeoutError: browserBackend.callTool: Timeout 5000ms exceeded ... taking page screenshot / waiting for fonts to load.... Calling browser_click and browser_snapshot on the same page can hit the same 5 s limit. The fix is browser_run_code_unsafe with await page.screenshot({ path, timeout: 60000, animations: 'disabled' }), which uses Playwright's own timeout. You can script clicks, mouse-wheel zoom and waits in the same call.