-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreenshot.js
More file actions
30 lines (22 loc) · 846 Bytes
/
screenshot.js
File metadata and controls
30 lines (22 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { chromium } = require('playwright');
(async () => {
console.log('🚀 Запускаю браузер...');
const browser = await chromium.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox']
});
const context = await browser.newContext({
viewport: { width: 1920, height: 1080 }
});
const page = await context.newPage();
console.log('📱 Открываю http://localhost:5173...');
await page.goto('http://localhost:5173', { waitUntil: 'networkidle' });
console.log('📸 Делаю скриншот...');
await page.screenshot({
path: '/home/temrjan/project/biotact-production/screenshot-full.png',
fullPage: true
});
console.log('✅ Скриншот сохранен: screenshot-full.png');
await browser.close();
console.log('👋 Готово!');
})();