use waitforloadstate
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user