Skip to content

skatsuta/puppeteer-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puppeteer-sample

Sample code to use Puppeteer library. It makes the background of GitHub's top page red and takes a screenshot of it.

Requirement

This Node.js script uses async/await, so it requires Node.js 7.6 or later.

Usage

  1. Run yarn command in the root of the repository.
  2. Create creds.js file which contains the following:
module.exports = {
  "username": "YOUR_GITHUB_USERNAME",
  "password": "YOUR_GITHUB_PASSWORD",
};
  1. Run npm start. It will log in to GitHub with your credentials, make the background of GitHub's top page red, and then take a screenshot of it. If successful, you will get a screenshot named GitHub.png.

About

Sample code to use Puppeteer library. It makes the background of GitHub's top page red and takes a screenshot of it.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published