Files
vtuber/test-browser.js

14 lines
637 B
JavaScript

const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] });
const page = await browser.newPage();
page.on('console', msg => console.log('BROWSER CONSOLE:', msg.text()));
page.on('pageerror', error => console.log('BROWSER ERROR:', error.message));
page.on('requestfailed', request => console.log('BROWSER REQUEST FAILED:', request.url(), request.failure().errorText));
await page.goto('https://vtuber.wooo.work/live/demo', { waitUntil: 'networkidle2' });
await new Promise(r => setTimeout(r, 5000));
await browser.close();
})();