简体   繁体   English

PlayWright Azure 管道错误:browsertype.launch:/home/vsts/.cache/ms-playwright/chromium-965416/chrome-linux/chrome 中不存在可执行文件

[英]PlayWright Azure Pipeline Error: browsertype.launch: executable doesn't exist at /home/vsts/.cache/ms-playwright/chromium-965416/chrome-linux/chrome

When I try to execute playwright scripts in Azure pipeline using YML file, I am getting the below error:当我尝试使用 YML 文件在 Azure 管道中执行编剧脚本时,出现以下错误:

browserType.launch: Executable doesn't exist at /home/vsts/.cache/ms-playwright/chromium-965416/chrome-linux/chrome ╔═════════════════════════════════════════════════════════════════════════╗ ║ Looks like Playwright Test or Playwright was just installed or updated. browserType.launch:可执行文件不存在于/home/vsts/.cache/ms-playwright/chromium-965416/chrome-linux/chrome╔══════════════════ ══════════════════════════════════════════════════ ═════╗║ 看起来 Playwright Test 或 Playwright 刚刚安装或更新。 ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ npx playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚═════════════════════════════════════════════════════════════════════════╝ ║ ║ 请运行以下命令下载新的浏览器: ║ ║ ║ ║ npx playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════ ══════════════════════════════════════════════════ ══╝

Context Used in YML file: YML 文件中使用的上下文:

pool: vmImage: 'ubuntu-20.04'池:vmImage:'ubuntu-20.04'

container: mcr.microsoft.com/playwright:focal容器:mcr.microsoft.com/playwright:focal

steps:脚步:

  • task: NodeTool@0 inputs: versionSpec: '16.x' displayName: 'Install Node.js'任务:NodeTool@0 输入:versionSpec:'16.x' displayName:'Install Node.js'

  • script: |脚本: | npm install --registry https://registry.npmjs.org --no-fund playwright npx playwright install npm test displayName: 'npm install and test' npm install --registry https://registry.npmjs.org --no-fund playwright npx playwright install npm test displayName: 'npm install and test'

Dependencies Used:使用的依赖项:

"devDependencies": { "@playwright/test": "^1.18.1", "jest": "27.5.1", "mocha": "^9.2.1", "playwright": "^1.18.1" } "devDependencies": { "@playwright/test": "^1.18.1", "jest": "27.5.1", "mocha": "^9.2.1", "playwright": "^1.18.1" }

After changing the pool: vmImage from 'ubuntu-20.04' to 'windows-2019' and更改池后:vmImage 从 'ubuntu-20.04' 到 'windows-2019' 和

Node.js versionSpec from '16.x' to '17.x' the pipeline error gone Node.js versionSpec 从“16.x”到“17.x”管道错误消失

I'd recommend to pin your Docker image to a specific Playwright version:我建议将您的 Docker 图像固定到特定的 Playwright 版本:

docker pull mcr.microsoft.com/playwright:v1.20.0-focal

Also you don't need to have playwright or jest installed, @playwright/test is enough.您也不需要安装playwrightjest@playwright/test就足够了。 After these changes it should work!经过这些更改后,它应该可以工作!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以将 Playwright-Javascript 框架集成到 azure devops 管道? - Is it possible to integrate Playwright-Javascript framework to azure devops pipeline? Azure Devops 管道和管道挂起的剧作家测试失败 - Playwright test fails on Azure Devops Pipeline and pipeline hangs Azure 应用服务部署管道任务错误:资源不存在/UnhandledPromiseRejectionWarning 当资源存在时 - Azure App Service Deploy pipeline task error: Resource doesn't exist/UnhandledPromiseRejectionWarning when resource exists VSTS-dotnet恢复-PackageCache不存在 - VSTS - dotnet restore - PackageCache doesn't exist 如何在 Azure 函数中运行 python playwright - How to run python playwright in Azure functions 在 Azure DevOps 上运行 Playwright dotnet 测试 - Running Playwright dotnet tests on Azure DevOps 尽管存在配置,但部署失败并在 VSTS CD 管道中出现错误 - Deployment failed with error in VSTS CD pipeline despite configs exist Azure 管道错误:目录“/home/vsts/work/1/a”为空。 不会添加任何内容来构建工件“掉落” - Azure pipeline error: Directory '/home/vsts/work/1/a' is empty. Nothing will be added to build artifact 'drop' Azure 管道在 /home/vsts/work/_temp/ 的某些 shell 脚本中出现致命错误 - Azure pipeline giving fatal error in some shell script at /home/vsts/work/_temp/ Azure Pipeline App Service Deploy:ENOENT:没有这样的文件或目录,stat &#39;/home/vsts/work/1/s/bin/python&#39; - Azure Pipeline App Service Deploy: ENOENT: no such file or directory, stat '/home/vsts/work/1/s/bin/python'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM