Dev./Node.js
[Node.js] puppeteer 모바일
인쥭
2021. 6. 18. 15:46
반응형
개인 기록용
const puppeteer = require('puppeteer');
const iPhone = puppeteer.devices['iPhone 6'];
(async() => {
const browser_options = { headless: false };
const browser = await puppeteer.launch(browser_options);
const page = await browser.newPage();
await page.emulate(iPhone);
await page.goto('https://naver.com');
await browser.close();
})();
결과