如何在Nightwatch.js中断言不区分大小写的.containsText?

问题描述

如何在containsText中断言不区分大小写的{。{1}}? 例如,我在Google上搜索Nightwatch.js领域”。 搜索结果有很多可能性,例如“奥丁球”,“奥丁球”,“奥丁球”等,我想仅用“奥丁球”来断言。 这是我写的代码

odin

解决方法

https://nightwatchjs.org/api/#assert-containsText

用法:

this.demoTest = function (browser) {
  browser.assert.containsText("#main","The Night Watch");
};