【发布时间】:2019-08-14 15:17:07
【问题描述】:
尝试使用 taiko 运行 Gauge 以自动化一些 Web 测试。 sudo gauge run specs 抛出两个类型错误和“无法要求 Taiko”
Taiko、nodejs、npm 已安装并且工作正常。仪表似乎大部分都很好。 gauge init js 工作。
我尝试将 .spec 文件移动到不同的目录,并移动 taiko 和 nodejs,没有任何区别。
复制,安装所有必要的东西:
gauge init js
gauge run specs
应该运行 'init' 创建的 .spec 文件
实际上输出太长而无法包含,但会根据要求显示。 错误:
1)
Unable to require module 'taiko' in /home/harry/tests/step_implementation.js
Trace: Error: Cannot find module 'taiko'
Require stack:
- /home/harry/tests/step_implementation.js
2)
const { openBrowser,write, closeBrowser, goto, press, text, focus, inputField, toRightOf } = require('taiko');
^
TypeError: Cannot destructure property `openBrowser` of 'undefined' or 'null'.
3)
new Test(step.fn, parameters, timeout).run().then(
^
TypeError: Cannot read property 'fn' of undefined
4)
[Gauge]
Connection to runner with Pid 15653 lost. The runner probably quit unexpectedly.
【问题讨论】:
-
请看规则/*.com/conduct...这个问题的格式不正确。
标签: javascript node.js ubuntu getgauge