Docker image with puppeteer preinstalled
Original can be found here
Original docs can be found here
docker run -it --rm --cap-add=SYS_ADMIN -v $PWD:/data -w /data rabotaua/lhci lhci collect --numberOfRuns=1 --url="https://m.robota.ua/"
script.js
module.exports = async (browser, context) => {
const page = await browser.newPage();
await page.goto("https://m.robota.ua/account/login");
await page.type("#email", "[email protected]");
await page.type("#password", "*************");
await page.click('input[type="submit"]');
await page.waitForNavigation();
};
docker run -it --rm --cap-add=SYS_ADMIN -v $PWD:/data -w /data rabotaua/lhci lhci collect --numberOfRuns=1 --url="https://m.robota.ua/notepad/cvlist" --puppeteerScript="script.js"
ls -la .lighthouseci
open .lighthouseci/lhr-*.html