【发布时间】:2018-11-08 08:43:54
【问题描述】:
感谢奶昔!
如何使用 chai/chai-smoothie 断言输入字段的值?
鉴于 getText() 始终为空,我们应该使用 element.getAttribute('value')(参见:How to getText on an input in protractor)
我希望能够做类似的事情:
expect(this.nameTextbox).to.eventually.have.value('name');
这似乎不起作用:
expect(this.nameTextbox.getAttribute('value')).to.eventually.equal('name');
AssertionError: expected { Object (browser_, then, ...) } to equal 'name'
【问题讨论】:
标签: protractor chai cucumberjs serenity-js