I need to sort list strings under the table ,so for that i have written following lines of code but on console i am not getting any values:
var rows = element.all(by.repeater('row in renderedRows'));
var column = element.all(by.repeater('col in renderedColumns'));
expect(rows.count()).toEqual(5);//here its printing number of rows
expect(column.count()).toEqual(5);//here its printing number of columns
var arr=[rows.count()];
for(var i=0;i<rows.count();i++)
{
console.log("aai"+i);
if(i=0)
{
//var columnvalue=column.get(9).getText();
var columnvalue=column.get(9).getText().then(function(ss){
return ss.trim();
arr[i]=ss.trim(); //here it will save the value first value of column
console.log("value1"+arr[i]);
expect(arr[i]).toEqual('DN');
console.log("aa"+ss.trim());
});
}
else{
var j=j+8;
var columnvalue=column.get(j).getText().then(function(ss){
return ss.trim();
arr[i]=ss.trim();//here it will save the other values of column
console.log("value"+arr[i]);
expect(arr[i]).toEqual('DN');
console.log("ab"+ss.trim());
});
}
}