Playwright failed in the Gitlab pipeline with browserType.launch: Host system is missing dependencies

Viewed 1208

I know my question is similar to this one, but hope someone can help me to execute Playwright tests in the Gitlab pipeline.

My .gitlab-ci.yaml insludes next lines:

image: node:16.13.0
...
test e2e:
  stage: test
  script:
    - npx playwright install
    - npm run test-e2e

Can I somehow set a proper docker image or OS that is supported..?

enter image description here

1 Answers

Was described in the official docs https://playwright.dev/docs/ci#gitlab-ci

You can set image per job like in my case:

test e2e:
  stage: test
  **image: mcr.microsoft.com/playwright:v1.16.3-focal**
  script:
   - npx playwright install
   - npm run test-e2e
Related