javascript - protractor js e2e tests, using multiple conditions on expect -
in current test i'm working on, need validate individual column on individual row, , check value accordingly, think expect(...)
i'm getting wrong i'm not entirely sure, errors i'm getting are:
typeerror: object [object object] has no method 'row'
typeerror: cannot call method 'element' of undefined
//function in page.js file: page.prototype.getsummaryinfo = function () { return element.all(by.repeater('accountssummary in accountssummaries')) .map(function (item, idx, rownumber) { return { index: idx, row: rownumber.element(by.repeater('accountssummary in accountssummaries')).get(rownumber), currency: item.element(by.binding('accountssummary.currency')).gettext(), totalbalance: item.element(by.binding('accountssummary.amount')).gettext(), totalaccounts: item.element(by.binding('accountssummary.noofaccounts')).gettext() }; }); }; // calling function in test: it("should summary info", function() { var details = page.getsummaryinfo(); expect(details.row(2)).totalaccounts.tobe("17"); });
Comments
Post a Comment