【发布时间】:2019-04-04 08:17:56
【问题描述】:
我正在 Visual Studio 代码中使用 testcafe 编写我的第一个测试,但收到此错误“导入:术语 'import' 未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。
At line:1 char:1
+ import { Selector } from 'testcafe';
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException"
【问题讨论】:
-
Bravo535,如果您可以在您的工作文件夹中附加文件
package.json中的“node:”、“testcafe:”和“npm:”版本会有所帮助吗?
标签: powershell automated-tests e2e-testing web-testing testcafe