当package.json文件中定义了npx testcafe'chrome --start-fullscreen'时,全屏无法工作-testcafe

问题描述 投票:3回答:1

我正在学习testcafe,并且我是新手。

根据testcafe docs命令npx testcafe 'chrome --start-fullscreen'应该打开全屏并运行测试,这可以很好地完成工作。但是,当我在package.json文件中的scripts标记下定义了相同的命令时,它没有打开全屏显示

  "scripts": {
    "testsOnChrome": "npx testcafe 'chrome --start-fullscreen'"

  }

感谢您的任何帮助

testcafe ui-testing
1个回答
3
投票

您需要将命令chrome --start-fullscreen插入双引号"而不是单引号'

使用此

"testsOnChrome": "npx testcafe \"chrome --start-fullscreen\""
© www.soinside.com 2019 - 2024. All rights reserved.