Skip to content Skip to sidebar Skip to footer

How To Find Specific Row In Ng-table By Text [protractor]

I want to select specific element from a table by the second column value (I removed the whitespaces that where rendered), and after that element is found I want to click on it. (t

Solution 1:

You should return the filtered elements before trying to click on them i guess. Here's how -

element.all(by.repeater('item in $data track by $index')).filter(function(row) {
    return row.getText().then(function(txt) {
        txt = txt.replace(/\s/g, '');
        var found = txt.split('ID0001');
        return found.length > 1;
    });
}).then(function(elem){
    elem[0].click();
});

Hope this helps.

Post a Comment for "How To Find Specific Row In Ng-table By Text [protractor]"