<div ng-show="item.Allowed=='true' && item.RequiresApproval=='false'" class="">
<button class="smallbutton" ng-click="addToCart()" ng-disabled="!canAddToCart()">Add to Cart</button>
</div>
I am using casperjs to click on Add to cart ,please suggest how can we click it.
I used below, but it is not working:
casper.then(function() {
casper.clickLabel('Add to Cart', 'button');
casper.wait(3000);
casper.emit('take.snapshot');
});
casper.then(function() {
this.click('.smallbutton');
});
casper.then(function() {
this.mouse.click('.smallbutton');
});
casper.then(function() {
this.sendKeys('.smallbutton', casper.page.event.key.Enter);
});