验证testcafe

我正在用Testcafe和黄瓜。如图所示,我具有以下列表行值,并且需要根据预期文本验证列表中显示的值。

html source

我正在尝试使用下面的代码,其中数据是从功能文件传递的,

for(let i = 0 ; i < 3 ; i++){         
        const fieldName = Selector("div.nba-meta-action>div.nba-row>div.nba-row-left").with({ boundTestRun: testController }).withText(data[i].field);
        testController.expect(fieldName.exists).ok();
        const fieldValue = Selector("div.nba-meta-action>div.nba-row>div.nba-row-right").with({ boundTestRun: testController }).withText(data[i].value);
        testController.expect(fieldValue.exists).ok();
    }

我收到一条错误消息,内容为“ errMsg:'AssertionError:预期为true”。

有人可以在这里帮忙吗?

谢谢

beichenx 回答:验证testcafe

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3169653.html

大家都在问