how to check a variable in an area without ng-bind and ng-model?
<span ng-if="user.code === 'YELLOW'">
<span class="glyphicons glyphicons-circle-remove text-danger"></span> Yellow
</span>
<span ng-if="user.code === 'GREEN'">
<span class="glyphicons glyphicons-circle-exclamation-mark text-warning"></span> Green
</span>
I would like to check user.code with protractor
With ng-bind and ng-model it does not work
browser.expect(element(by.binding('user.code')).getText()).to.eventually.equal('');
or
browser.expect(element(by.model('user.code')).getAttribute('value')).to.eventually.equal('');
Mistake:
NoSuchElementError: No element found using locator: by.binding("user.code")
NoSuchElementError: No element found using locator: by.model("user.code")
source
share