Skip to content

Instantly share code, notes, and snippets.

@weburnit
Created January 29, 2018 15:16
Show Gist options
  • Save weburnit/addd237e4b2487fa44f6fca5abddd4ad to your computer and use it in GitHub Desktop.
Save weburnit/addd237e4b2487fa44f6fca5abddd4ad to your computer and use it in GitHub Desktop.
GobearJS
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