同时输入以下命令
npx playwright test --browser=firefox 发生此错误
Error: Cannot use --browser option when configuration file defines projects. Specify browserName in the projects instead.
at Loader._processConfigObject (D:\Playwright class\LoginTest\node_modules\@playwright\test\lib\loader.js:105:69)
at Loader.loadConfigFile (D:\Playwright class\LoginTest\node_modules\@playwright\test\lib\loader.js:79:16)
at Runner.loadConfigFromResolvedFile (D:\Playwright class\LoginTest\node_modules\@playwright\test\lib\runner.js:198:12)
at runTests (D:\Playwright class\LoginTest\node_modules\@playwright\test\lib\cli.js:171:27)
at Gi.<anonymous> (D:\Playwright class\LoginTest\node_modules\@playwright\test\lib\cli.js:82:7)发布于 2022-11-15 10:32:01
您可能有您的剧作家配置设置来使用项目。您需要的命令如下:
npx playwright test --project=firefox只需输入要测试的项目在playwright.config.ts中定义的名称即可。
https://stackoverflow.com/questions/74429175
复制相似问题