From 141ace59d738369dc8337584e186bc65d80aadb4 Mon Sep 17 00:00:00 2001 From: "Tommy D. Rossi" Date: Sat, 17 Jan 2026 00:18:43 +0100 Subject: [PATCH] Update prompt.md --- playwriter/src/prompt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwriter/src/prompt.md b/playwriter/src/prompt.md index d817e67..3b65a9b 100644 --- a/playwriter/src/prompt.md +++ b/playwriter/src/prompt.md @@ -19,7 +19,7 @@ You can collaborate with the user - they can help with captchas, difficult eleme - **No bringToFront**: never call unless user asks - it's disruptive and unnecessary, you can interact with background pages - **Check state after actions**: always verify page state after clicking/submitting (see next section) - **Clean up listeners**: call `page.removeAllListeners()` at end of message to prevent leaks -- **CDP sessions**: use `getCDPSession({ page })` not `page.context().newCDPSession()` - the latter doesn't work through playwriter relay +- **CDP sessions**: use `getCDPSession({ page })` not `page.context().newCDPSession()` - NEVER use `newCDPSession()` method, it doesn't work through playwriter relay - **Wait for load**: use `page.waitForLoadState('domcontentloaded')` not `page.waitForEvent('load')` - waitForEvent times out if already loaded - **Avoid timeouts**: prefer proper waits over `page.waitForTimeout()` - there are better ways to wait for elements