-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-basic-browser.js
More file actions
36 lines (25 loc) · 1.12 KB
/
test-basic-browser.js
File metadata and controls
36 lines (25 loc) · 1.12 KB
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
31
32
33
34
35
36
const puppeteer = require('puppeteer');
async function testBasicBrowser() {
console.log('🔍 Базовый тест браузера...');
try {
const browser = await puppeteer.launch({
headless: false, // Показываем браузер
args: ['--no-sandbox', '--disable-setuid-sandbox']
});
const page = await browser.newPage();
console.log('📱 Открываем Google...');
await page.goto('https://google.com', { timeout: 10000 });
console.log('✅ Google открылся успешно!');
console.log('📱 Пробуем открыть PumpFun...');
await page.goto('https://pump.fun', { timeout: 15000 });
const title = await page.title();
console.log('✅ PumpFun открылся! Заголовок:', title);
console.log('⏰ Держу браузер открытым 15 секунд...');
await page.waitForTimeout(15000);
await browser.close();
console.log('✅ Тест завершен успешно');
} catch (error) {
console.error('❌ Ошибка:', error.message);
}
}
testBasicBrowser();