use waitforloadstate

This commit is contained in:
Tommy D. Rossi
2025-12-19 19:09:19 +01:00
parent b0f786a166
commit 5b474087eb
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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
+1 -1
View File
@@ -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
}
}