https://github.com/mcnuttandrew/no-grammar-supplement
Raw File
Tip revision: ea691644b2658883adc1659be0e9542dec7f743d authored by Andrew Michael McNutt on 13 December 2023, 01:29:56 UTC
ugh
Tip revision: ea69164
generate-table.ts
import puppeteer from 'puppeteer';
import fs from 'fs/promises';

async function main() {
  const browser = await puppeteer.launch({headless: true});
  const page = await browser.newPage();
  await page.goto('http://localhost:5000/#/summary-table');
  await page.waitForSelector('#table');
  const table = await page.$('#table');
  if (table) {
    await table.screenshot({path: 'generated-table.png'});
  }
  await browser.close();
}

main();
back to top