/screener

A puppeteer script to take screenshots in 3 device sizes

Primary LanguageJavaScript

BASIC SETUP

  1. Run npm i
  2. Create a .env file at the root of your project
  3. Define the following variables:
  • NAME which is your username
  • PW which is your password
  1. Update the Feature Name, Login URL and Feature URL in index.js
  2. Make sure your change the selectors of the login fields and login button in the code below:
  await page.type('#auth-username', username);
  await page.type('#auth-password', pw);
  await page.click(
    'body > main > div > div > div > div:nth-child(1) > form > button'
  );
  1. Once you're done with this, just run node index.js in the projet folder files will be created in ./screens

NB: You can change the settings headless: false and slowMo: 200 to either prevent the browser window to open or speed-up its execution.