Created
January 29, 2018 15:16
-
-
Save weburnit/addd237e4b2487fa44f6fca5abddd4ad to your computer and use it in GitHub Desktop.
GobearJS
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
brew install nodejs | |
npm install -g yarn | |
yarn add puppeteer | |
# save this content to file gobear.js | |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto('https://gobear.com'); | |
await page.screenshot({path: 'gobear.png'}); | |
await page.click('#button-vn') | |
await browser.close(); | |
})(); | |
### run this | |
nodejs gobear.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment