Protractor find element inside a repeater

后端 未结 5 1709
南笙
南笙 2020-12-09 16:06

Below is my markup


  {{post.title}}
  <         


        
5条回答
  •  孤街浪徒
    2020-12-09 16:53

    The answer from nilsK helped me, but didn't work completely. The code below did the trick:

    element.all(by.repeater('post in posts')).then(function(posts) {
       var titleElement = posts[0].element(by.className('title'));
       expect(titleElement.getText()).toEqual('YourEnteredTitle');
    });
    

提交回复
热议问题