0
votes

I have a table and the first column of each row contains a check box, second column is contains a name. I want to check all rows and filter them if the second row contains what i ask. If it contains select the checkbox in the first column. here is my code but it doesnt select checkbox.

      element.all(by.css(' table > tbody >tr')).filter(function(element, index){
            return element.getText().then(function (text) {
                return text.includes('Company');
            })
        }).first().element(by.css(' table > tbody >tr > td#checked')).click();
       
Very difficult to answer without having the relevant HTML of the table structure. Also ICYMI, Protractor is now getting deprecated. github.com/angular/protractor/issues/5502demouser123