Skip to content

Instantly share code, notes, and snippets.

@nyk0r
Created February 26, 2018 17:22
Show Gist options
  • Save nyk0r/cf6f0914423620c851a58a2dfa17a956 to your computer and use it in GitHub Desktop.
Save nyk0r/cf6f0914423620c851a58a2dfa17a956 to your computer and use it in GitHub Desktop.
two puppeteer windows side by side
const puppeteer = require('puppeteer');
const width = 1920;
const height = 1080;
(async () => {
await puppeteer.launch({
headless: false,
args: [
`--window-size=${Math.floor(width/2)},${height}`,
`--window-position=0,0`
]
});
await puppeteer.launch({
headless: false,
args: [
`--window-size=${Math.floor(width/2)},${height}`,
`--window-position=${Math.floor(width/2)},0`
]
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment