cssClassPresent Nightwatch断言在预期值上添加“有”

时间:2019-08-27 15:27:51

标签: nightwatch.js assertion

我在NightwatchJS项目中工作,我试图构造一些验证器。 断言为cssClassPresent方法的className字段添加文本“ has”

return this.assert.cssClassPresent("span", "eb-add-shipment__btn ng-binding");

错误

Error while running "cssClassPresent" command: Testing if element <span> has css class: "eb-add-shipment__btn ng-binding" in 1000 ms. - expected "has eb-add-shipment__btn ng-binding" but got: "eb-add-shipment__btn ng-binding"

如您所见,期望的开头包含“有”文本,并且断言失败。 我只是想知道为什么失败了吗?

0 个答案:

没有答案