获取错误“未能找到资源的DNS记录”。执行我的第一个TestCafe脚本时

发布于 2025-02-11 09:02:34 字数 266 浏览 0 评论 0原文

我正在学习测试咖啡馆,以下示例代码写并执行。它无法正常工作,我收到的错误消息“无法找到资源的DNS记录”。请指导我需要

从'testcafe'中进行{selector}的设置; 从'testcafe'导入{fixture,test,page};

fixture 入门 .page https://www.google.com1 ; test('my test1',async(t)=> { 等待t 等待(3000) ; });

I am learning test cafe, written below sample code and executed. It is not working, I am getting error message "Failed to find a DNS-record for the resource". Please guide me what setting I need to do

import {Selector} from 'testcafe';
import {fixture,test,page} from 'testcafe';

fixture getting started.page https://www.google.com1
;
test('my test1', async (t) => {
await t
.wait(3000)
;
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蛮可爱 2025-02-18 09:02:34

看来页面选项中有一个错字。 google.com1网站无法使用浏览器访问。

请使用以下代码:

fixture `getting started`
    .page `https://www.google.com`;

test('my test1', async t => {
    await t.wait(3000);
});

It looks like there is a typo in the page option. The google.com1 website is not accessible with a browser.

Please use the following code:

fixture `getting started`
    .page `https://www.google.com`;

test('my test1', async t => {
    await t.wait(3000);
});

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文