Created
July 21, 2020 15:55
-
-
Save nutjane/2628dba3fb56eb5f47b3c50288f8c294 to your computer and use it in GitHub Desktop.
This file contains 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'); | |
(async() => { | |
const wsChromeEndpointurl = 'ws://127.0.0.1:9222/devtools/browser/df7b86aa-e82e-4124-93c4-a1a046d2943b'; // TODO: replace me | |
const browser = await puppeteer.connect({ | |
browserWSEndpoint: wsChromeEndpointurl, | |
}); | |
const page = await browser.newPage(); | |
await page.setViewport({ width: 1280, height: 800 }) | |
const url = 'https://google.com' | |
await page.goto(url); | |
// do what you want ¯\_(ツ)_/¯ | |
await page.close(); | |
// await browser.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment