protractor - Row and column method missing on element.all -


i have following setup, want protractor click on row (or checkbox in row, either fine):

<li data-ng-repeat="room in chatrooms | ***filters***">     <div ng-click="togglejoin(room.id)">         <input type="checkbox" value="{{room.id}}" ng-checked="ischecked(room.id)" />         <span>{{room.name}}</span>     </div> </li> 

and want page object:

var pageobject = function() {     this.lstchatrooms = element.all(by.repeater('room in chatrooms'));      this.clickchatroom = function(index) {         this.lstchatrooms.row(index).column('{{room.id}}').click();     }; }; 

but when try call clickchatroom index in test, error saying object has no method 'row', , i've seen same behavior 'column'. i'm not calling on list of chat rooms prior in test, promise should not resolved @ point. doing wrong?

update: issue may caused bug. unless can see i'm doing wrong api or else.

i can't test right now, should work you:

this.lstchatrooms.then(function(rooms) {    rooms[index].findelement(by.tagname('input')).click(); }); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -