dimanche 30 avril 2017

How to get values from ng-repeat in protractor?

<div ng-repeat="obj in list">
</div>

This obj is having 6 properties like name, country, state, city, street, and contact. I have written following code for this but it is giving me undefined as the value if i try to fetch the stored value in obj.

var elm = element.all(by.repeater('obj in list'));

elm.then(function(obj){
    console.log("Number of Rows : "+ rows.length);
    for(var i=0; i< rows.length; i++){
         console.log("App name : " + rows[i].name);
    }
});

This is printing "App name : undefined" only.

Aucun commentaire:

Enregistrer un commentaire