gpt4 book ai didi

ubuntu - Testcafe,测试没有运行?

转载 作者:行者123 更新时间:2023-12-04 18:26:05 27 4
gpt4 key购买 nike

我正在尝试开始使用 Testcafe。

我已经使用 npm 在全局范围内安装了它,并且我正在关注 https://devexpress.github.io/testcafe/documentation/getting-started/ 中的官方示例

import { Selector } from 'testcafe';

fixture `Getting Started`
.page `http://devexpress.github.io/testcafe/example`;

test('My first test', async t => {
await t
.typeText('#developer-name', 'John Smith')
.click('#submit-button');

const articleHeader = await Selector('.result-content').find('h1');

// Obtain the text of the article header
let headerText = await articleHeader.innerText;
});

我在使用 chromium 的旧 Ubuntu(我认为是 12.04)上。

我启动测试,可以看到浏览器加载了页面,并且控制台上显示了消息“Getting started”。

然而之后什么也没有发生。我没有看到测试名称、结果或任何内容。浏览器上也没有任何反应(没有输入文本)。

这可能有些愚蠢,但我似乎真的找不到我遗漏或做错了什么。

最佳答案

正如问题的作者所发现的,nodejs 或 chromium 版本是问题所在。

升级到最新版本解决了这个问题。

关于ubuntu - Testcafe,测试没有运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51725604/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com