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

[BUG]: recently added support for "new" headless mode fails with Playwright #1534

Closed
dgrebb opened this issue Dec 24, 2023 · 2 comments
Closed

Comments

@dgrebb
Copy link
Contributor

dgrebb commented Dec 24, 2023

Summary

As documented in the README, setting engineOptions.headless = "new" is passed to Playwright as expected, but fails.

[email protected]

Creating Browser
No Playwright browser specified, assuming Chromium.
      COMMAND | Command "test" ended with an error after [0.003s]
      COMMAND | browserType.launch: headless: expected boolean, got string

Details

Playwright supports "new" headless mode, set as a string, but only by defining ignoredDefaultArgs: ["--headless"].

This isn't well documented, but one can see Playwright's headless argument expects a boolean.

Deeply burred in a GitHub issue, there is a small example of how to make "new" headless mode work:

  projects: [
    {
      name: 'chromium',
      use: {
        launchOptions: {
          ignoreDefaultArgs: ['--headless'],
          args: ['--headless=new']
        }
      },
    },

(#1525) (dgrebb#73)

@dgrebb dgrebb changed the title [BUG]: recently added support for "new" headless mode fails with Playwright (#1525) (dgrebb/backstopjs#73) [BUG]: recently added support for "new" headless mode fails with Playwright Dec 24, 2023
@dgrebb
Copy link
Contributor Author

dgrebb commented Dec 24, 2023

Found and fixing 👍

dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
dgrebb added a commit to dgrebb/BackstopJS that referenced this issue Dec 24, 2023
garris pushed a commit that referenced this issue Dec 24, 2023
* feat: defaults puppeteer to `new` headless mode (garris/BackstopJS/#1525)

* fix: corrects playwr typo in `test/configs/playwright.json`

* fix: supports string in `headless: "new"` for Playwright (#1534)

* fix: corrects path for integration test pass/fail message scripts

* documentation: update README with `new` headless mode information

* documentation: adjust comment language in runPlaywright
@dgrebb
Copy link
Contributor Author

dgrebb commented Dec 25, 2023

Closed with #1535

@dgrebb dgrebb closed this as completed Dec 25, 2023
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

1 participant