最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

unit testing - Playwright does not find browsers after running install - Stack Overflow

programmeradmin4浏览0评论

First I run pnpm exec playwright install --with-deps which seems to install all browsers

But when I run the tests, I get a set of errors from Playwright saying it can't find Chrome, Webkit nor Firefox.

the errors all look like this, only the referenced browser and its path changes:

It seems like Playwright is looking at the wrong paths.

e.g For Chromium the install path is /home/runner/.cache/ms-playwright/chromium-1134, but it seems like Playwright is looking for it on the path /home/runner/.cache/ms-playwright/chromium_headless_shell-1161/chrome-linux/headless_shell

Any ideas on how to fix this?

btw: When running pnpm exec playwright install --with-deps this is logged in the Github Actions run: Switching to root user to install dependencies....

First I run pnpm exec playwright install --with-deps which seems to install all browsers

But when I run the tests, I get a set of errors from Playwright saying it can't find Chrome, Webkit nor Firefox.

the errors all look like this, only the referenced browser and its path changes:

It seems like Playwright is looking at the wrong paths.

e.g For Chromium the install path is /home/runner/.cache/ms-playwright/chromium-1134, but it seems like Playwright is looking for it on the path /home/runner/.cache/ms-playwright/chromium_headless_shell-1161/chrome-linux/headless_shell

Any ideas on how to fix this?

btw: When running pnpm exec playwright install --with-deps this is logged in the Github Actions run: Switching to root user to install dependencies....

Share Improve this question asked Mar 25 at 11:42 DanielDaniel 7172 gold badges12 silver badges27 bronze badges 1
  • 2 Can you edit your question to include more details about your pipeline? – bryanbcook Commented Mar 25 at 17:47
Add a comment  | 

1 Answer 1

Reset to default 0

Im not sure why the problem occured, but updating the playwright package to the latest version fixed it

发布评论

评论列表(0)

  1. 暂无评论