diff --git a/PLAYWRITER_AGENTS.md b/PLAYWRITER_AGENTS.md index a8bd78d..5d9e884 100644 --- a/PLAYWRITER_AGENTS.md +++ b/PLAYWRITER_AGENTS.md @@ -18,6 +18,8 @@ read playwriter/src/prompt.md to understand how the MCP works - a few more events need custom handling - tabs are identified by sessionId or targetId (CDP concepts) or tabId (chrome debugger concept only) +mcp.ts MUST never use console.log. only console.error + ## development extension/ contains the chrome extension code. you need to run `pnpm build` to make it ready to be loaded in chrome. the extension folder chrome will use is extension/dist diff --git a/playwriter/src/mcp.ts b/playwriter/src/mcp.ts index fb57432..f08c2d6 100644 --- a/playwriter/src/mcp.ts +++ b/playwriter/src/mcp.ts @@ -304,7 +304,7 @@ async function getCurrentPage(timeout = 5000) { if (pages.length > 0) { const page = pages[0] - await page.waitForEvent('load', { timeout }).catch(() => {}) + await page.waitForLoadState('load', { timeout }).catch(() => {}) return page } }