diff --git a/playwriter/src/prompt.md b/playwriter/src/prompt.md index 9e400c7..f01c084 100644 --- a/playwriter/src/prompt.md +++ b/playwriter/src/prompt.md @@ -291,6 +291,14 @@ const el = await page.evaluateHandle(() => globalThis.playwriterPinnedElem1); await el.click(); ``` +## taking screenshots + +Always use `scale: 'css'` to avoid 2-4x larger images on high-DPI displays: + +```js +await page.screenshot({ path: 'shot.png', scale: 'css' }); +``` + ## page.evaluate Code inside `page.evaluate()` runs in the browser - use plain JavaScript only, no TypeScript syntax. Return values and log outside (console.log inside evaluate runs in browser, not visible):