I m trying to check a if condition and do a click if its true, but it returns me a error 'eachOperator.toEqual is not a function'
var selectDropdownbyNum = function (element, optionNum) {
var opt = element.all(by.tagName('option'));
opt.each(function (eachOperator) {
eachOperator.toEqual('-').then(function (subtract) {
if (subtract) {
eachOperator.click();
}
});
});
};