How can I check if checkbox is checked with Protractor, CucumberJS and Chai ?
var el = 'myCheckbox';
this.expect(element(by.model(el)).to.have.prop("checked", true));
isSelected()
would do that:
this.expect(element(by.model(el)).isSelected()).to.eventually.be.true;
You should use this.expect(element(by.model(el)).isSelected()).to.eventually.be(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With