Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. <div class="row ng-scope" ng-repeat="post in posts">
  2. <div class="col-md-7">
  3. <h4 class="ng-binding">Topic - ABC</h4>
  4. <div class="text-right">
  5. <button class="btn btn-none btn-sm" ng-click="posts.newPost()">
  6. Create Post
  7. </button>
  8. </div>
  9. </div>
  10. </div>
  11. <div class="row ng-scope" ng-repeat="post in posts">
  12. <div class="col-md-7">
  13. <h4 class="ng-binding">Topic - XYZ</h4>
  14. <div class="text-right">
  15. <button class="btn btn-none btn-sm" ng-click="posts.newPost()">
  16. Create Post
  17. </button>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="row ng-scope" ng-repeat="post in posts">
  22. <div class="col-md-7">
  23. <h4 class="ng-binding">Topic - EFG</h4>
  24. <div class="text-right">
  25. <button class="btn btn-none btn-sm" ng-click="posts.newPost()">
  26. Create Post
  27. </button>
  28. </div>
  29. </div>
  30. </div>
  31.  
  32. var button = $$(by.repeater('post in posts')).get(1).$(by.css('[ng-click="posts.newPost()"]'))
  33.  
  34. button.click(); // click is not showing up
  35.  
  36. var button = element.all(by.repeater('post in posts')).get(1).$('[ng-click*=newPost]');
  37. button.click();
  38.  
  39. var button = element.all(by.repeater('post in posts')).filter(function (post) {
  40. return post.$("h4").getText().then(function (postTitle) {
  41. return postTitle === "Topic - XYZ";
  42. });
  43. }).get(1).$('[ng-click*=newPost]');
  44. button.click();
  45.  
  46. var post = element.all(by.repeater('post in posts')).get(1);
  47.  
  48. var button = post.element(by.buttonText("Create Post"));
  49. button.click();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement