I am trying to check the value of three dropdown boxes using BDD and Protractor.
The code related to this is:
checkDropdown: function (value, dropdown) {
let name = element(by.id(dropdown));
console.log(name.getText());
expect(name.getText()).to.equal(value);
},
And the output is:
AssertionError: expected { Object (browser_, then, ...) } to equal 'Apparent Energy'
How can I do to make it works? I thought that getText should retrieves a string instead of an object.
Thanks in advance.