testcafe正在打开浏览器,默认为/ browser / connect /…,但无法执行测试

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

我一直在尝试使用nodejs运行testcafe,但是浏览器无法继续执行脚本。它在控制台中显示此错误:无法建立一个或多个指定的浏览器连接。这可能是由网络问题或远程设备故障引起的。

我只有一个简单的测试用例。

fixture`Home page`
  .page`http://www.google.com`;  // specify the start page

test("The heading should be...", async t => {
  const title = Selector('h1');
  await t.expect('t').eql('t')
});

任何人都可以帮忙吗?

谢谢。

node.js automation automated-tests e2e-testing testcafe
1个回答
3
投票

可能可能需要将选项--hostname localhost和/或--proxy选项添加到TestCafe命令行。

© www.soinside.com 2019 - 2024. All rights reserved.