Answers for "puppeteer full screen"

0

puppeteer full screen from launch

const browser = await puppeteer.launch({
  headless: false,
  args: ['--start-fullscreen']
});
Posted by: Guest on May-23-2021
0

puppeteer full display

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    args:[
       '--start-maximized' // you can also use '--start-fullscreen'
    ]
    });

  const page = await browser.newPage();
  await page.setViewport({ width: 1366, height: 768});
  await page.goto('https://example.com', {waitUntil: 'networkidle2'});
  await page.screenshot({path: 'example.png'});

  browser.close();
})();
Posted by: Guest on December-29-2020

Browse Popular Code Answers by Language