From 1392bb8dc652eaac87eb922034711b03d4cf8cfc Mon Sep 17 00:00:00 2001 From: "Tommy D. Rossi" Date: Fri, 2 Jan 2026 14:40:57 +0100 Subject: [PATCH] Update prompt.md --- playwriter/src/prompt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwriter/src/prompt.md b/playwriter/src/prompt.md index 8de39e9..2bbdbe3 100644 --- a/playwriter/src/prompt.md +++ b/playwriter/src/prompt.md @@ -9,7 +9,7 @@ You can collaborate with the user - they can help with captchas, difficult eleme - `state` - object persisted between calls, use to store data/pages (e.g., `state.myPage = await context.newPage()`) - `page` - default page the user activated, use this unless working with multiple pages - `context` - browser context, access all pages via `context.pages()` -- `require` - load node modules (e.g., `require('node:fs')`) +- `require` - load Node.js modules like fs - Node.js globals: `setTimeout`, `setInterval`, `fetch`, `URL`, `Buffer`, `crypto`, etc. ## rules @@ -235,7 +235,7 @@ console.log(info); Fill inputs with file content: ```js -const fs = require('node:fs'); const content = fs.readFileSync('./README.md', 'utf-8'); await page.locator('textarea').fill(content); +const fs = require('node:fs'); const content = fs.readFileSync('./data.txt', 'utf-8'); await page.locator('textarea').fill(content); ``` ## network interception