You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
409 B
10 lines
409 B
const { chromium } = require('playwright');
|
|
|
|
(async () => {
|
|
const browser = await chromium.launch({ args: ['--no-sandbox'] });
|
|
const page = await browser.newPage({ viewport: { width: 1920, height: 1080 } });
|
|
await page.goto('https://www.baidu.com');
|
|
await page.screenshot({ path: '/root/.openclaw/workspace/baidu.png' });
|
|
await browser.close();
|
|
console.log('Screenshot saved to baidu.png');
|
|
})();
|
|
|