donpasquale
donpasquale

Reputation: 115

How to confirm a ng-show (Angular) popup with Puppeteer?

I try to confirm an Angular popup box (ng-show) and click the "ok" button (ng-confirm-click) but it doesn't work. how can I confirm the following appearing popup for the Delete Button?

<a class="BtnDelete sendToTrash" ng-show="showDelete" ng-confirm-click="" confirmed-click="deleteMessages()" target="_blank" id="send_to_trash"><span>Delete</span></a>

Upvotes: 0

Views: 147

Answers (1)

donpasquale
donpasquale

Reputation: 115

I need to execute "deleteMessages()" which is executed when somebody press "OK" --> confirmed-click. So I am wondering how to do this.

So the most important part in this Popup is:

confirmed-click="deleteMessages()

As far as i know it's Angular? But how can I execute Angular functions with Puppeteer? It's still Javascript.

<a class="BtnDelete sendToTrash" ng-show="showDelete" ng-confirm-click="" confirmed-click="deleteMessages()" target="_blank" id="send_to_trash"><span>Delete</span></a>

Upvotes: 0

Related Questions