Created
February 26, 2018 17:22
-
-
Save nyk0r/cf6f0914423620c851a58a2dfa17a956 to your computer and use it in GitHub Desktop.
two puppeteer windows side by side
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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