I have the following markup, and I am trying to access the <button />
<ul class="flower-list">
<li ng-repeat="flower in model.flowers">
<img ng-src="flower.imgUrl">
<button ng-click="model.addToFlowerPot(flower)">Add</button>
</li>
</ul>
I have the following:
var flower = element.all(by.repeater('flower in model.flower')).first();
var addButton = flower.element(by.buttonText("Add"));
addButton.click();
Check if there is a delay if the data is coming from service. You can wait until you get the data with
browser.waitForAngular()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With