0
<md-tab *ngFor="let course of profCourses>
   <div class="wrapper">
        <!--some html-->
   </div>
</md-tab>

I want to set profCourses from protractor and test the functionality of inner html. How to set such binding from protractor?

Is it something like

element.all(by.repeater('let course of profCourses')).then(function (courses) {
       courses[0].sendKeys('Course 1');
       courses[1].sendKeys('Course 2');
       courses[2].sendKeys('Course 3');
    });

I am getting error for above as "Cannot read property 'sendKeys' of undefined"

PS: I am using Angular 4.0

Sanket Achari
  • 480
  • 1
  • 6
  • 20

1 Answers1

0

The correct code would be

   courses.get(0).sendKeys('Course 1');
   courses.get(1).sendKeys('Course 2');
   courses.get(2).sendKeys('Course 3');
Sanja Paskova
  • 1,110
  • 8
  • 15