I am fairly new to protractor, tried learning automating angular homepage (<https://angularjs.org/>). I am facing trouble in the **JavaScript Projects** section.

Steps that worked:

```
it ('should click on the plus sign', function() {
        $('.icon-plus-sign').click();
            expect(element(by.model('editProject.project.name')).isPresent()).toBe(true);
});

it ('should fill up the form', function() {
            element(by.model('editProject.project.name')).sendKeys('Test Name');
            element(by.model('editProject.project.site')).sendKeys('https://www.testsite.com');
            element(by.model('editProject.project.description')).sendKeys('Test Description');
            expect(element(by.buttonText('Save')).getAttribute('disabled')).toBe(null);
});

```

Step that is failing:

```
it ('should click on save button', function() {
            element(by.buttonText('Save')).click();
            // $$('tr[class="ng-scope"]')
            element.all(by.repeater("project in projectList.projects | filter:projectList.search | orderBy:'name'")).then(function(trElements) {
                console.log(trElements.length);
                for (var i = trElements.length - 1; i >= 0; i--) {
                    console.log('outside if' + i);
                    if (trElements[i].all(by.tagName('td')).first().element(by.tagName('a')).getText() == 'Test Name') {
                        console.log('inside if' + i);
                        expect(trElements[i].all(by.tagName('td')).first().element(by.tagName('a')).getAttribute('ng-href')).toContain('www.testsite.com');
                        expect(trElements[i].all(by.tagName('td')).get(1).getText()).toBe('Test Description');
                        break;
                    }
                }
            });

            browser.sleep(5000);
});

```

The **trElements.length** is returning **0**, but the elements are surely present in DOM and they get highlighted in Elements tab in Chrome DevTools.

Please help me with this.

Thanks in advance!