Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The puppeteerLaunchOptions seems not working #947

Open
yixuanhou opened this issue Oct 8, 2023 · 3 comments
Open

The puppeteerLaunchOptions seems not working #947

yixuanhou opened this issue Oct 8, 2023 · 3 comments

Comments

@yixuanhou
Copy link

yixuanhou commented Oct 8, 2023

Describe the bug
I suspect the puppeteerLaunchOptions is not working because I passed "new" to the headless option, and I still get the headless deprecation warning. I also tried passing false to it, and getting the same warning and there was no chrome instance launched.
Screenshot 2023-10-09 at 10 59 44 AM

To Reproduce

  1. setting up .lighthouserc.js
module.exports = {
  ci: {
    collect: {
      staticDistDir: "./build",
      puppeteerScript: "./puppeteer-script.js",
      puppeteerLaunchOptions: {
        headless: false,
        slowMo: 100,
      },
      settings: {
        disableStorageReset: true,
      },
      numberOfRuns: 1,
    },
    assert: {
      preset: "lighthouse:recommended",
    },
  },
};

And setting up puppeteer-script.js.

module.exports = async (browser, context) => {
  const page = await browser.newPage();

  await page.goto(context.url);

  await page.waitForSelector('input[type="email"]');

  await page.type('body input[type="email"]', user);
  console.log("email typed");
  await page.click('body input[type="submit"]');
  await page.type('body input[type="password"]', pwd);
  console.log("password typed");
  await page.click('body input[type="submit"]');

  await page.click('body input[type="submit"]');
};

Expected behavior
I'm expecting when I set the headless to be false, after run lhci collect, a chrome browser gets launched so that I can debug the log in steps.

@jeremyfrank
Copy link

I am experiencing the same issue when passing { headless: "new" } to puppeteerLaunchOptions. The old headless deprecation warning still appears.

@jakub-izbicki-wttech
Copy link

Same for me.

@danaragao
Copy link

Still and issue, anyone looking at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants