resize browser with puppeteer

By | July 17, 2018
Questions:

Is it possible to resize the browser window with puppeteer? I know there is page.setViewport, but is there anything like browser.setViewport? Maybe it sounds like there isn’t much difference if you’re running the headless version, but it can be useful if you’re actually displaying the window, I’d like to do something like this:

const puppeteer = require("puppeteer");

(async () => {
let browser = await puppeteer.launch({
    headless: false
});
await browser.setViewport({
    width: 100,
    height: 100,
});
})();
Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *