askrobots / dbbasic-web-native
Public
100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
danq9
Add canonical.html v1.0 - The single source of truth for usability standards
fb6e650
1 year ago
History
take-screenshot.js · 460 bytes · 11 lines
| 1 | const { chromium } = require('playwright'); |
| 2 | |
| 3 | (async () => { |
| 4 | const browser = await chromium.launch(); |
| 5 | const page = await browser.newPage(); |
| 6 | await page.setViewportSize({ width: 1920, height: 1080 }); |
| 7 | await page.goto('file://' + process.cwd() + '/demo-saas-landing.html'); |
| 8 | await page.screenshot({ path: 'demo-fixed-layout.png', fullPage: false }); |
| 9 | await browser.close(); |
| 10 | console.log('Screenshot saved to demo-fixed-layout.png'); |
| 11 | })(); |