how to check variable in scope 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 the user.code with protractor
With ng-bind and ng-model it doesn't 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('');
Error :
NoSuchElementError: No element found using locator: by.binding("user.code")
NoSuchElementError: No element found using locator: by.model("user.code")