EDITED
我在尝试使用TestCase Javascript API创建测试视频时遇到此问题。
我正在使用testcafe版本0.22.0,我已经在他们的文档中具有请求的先决条件。
基本上,问题是我的跑步者对象中不存在视频功能。
createTestCafe('localhost', 1337, 1338)
.then(testcafe => {
runner = testcafe.createRunner();
return testcafe.createBrowserConnection();
})
.then(remoteConnection => {
// Outputs remoteConnection.url so that it can be visited from the remote browser.
runner
.video(artifactsPath, true)
.src(specsPath + '/run-animation.spec.ts')
.browsers(['chrome'])
.reporter('json')
.run()
.then(failedCount => {
console.log('Error: ', failedCount);
})
.catch(error => {
console.log('Error: ', error);
});
});
您正在使用旧的TestCafe版本。 “录制视频”功能出现在比0.22.0
更早的版本中。最新的TestCafe版本(1.1.2
)完全包含此功能。