Protractor Get Model Value
It is just because getAttribute()
returns a promise.
You need to resolve it if you want to see the result on the console:
var elm = element(by.model("Promotion.PrometricID"));elm.getAttribute('value').then(function (value) { console.log(value);});
FYI, exploring The WebDriver Control Flow documentation page should clear things up.
this way worked for me:
element(by.binding('Promotion.PrometricID')).getText().then(function (value) { console.log(value); })
My solution:
element(by.model('Promotion.PrometricID')).getText().then(function (value) { console.log(value);});