I am using some third party js and html library(I don't want to update this library). There is an "apply all" button in HTML and what I want to do is "click this button when it becomes visible."
<div class="confirm" ng-show="newFilters.length">
....
<button class="btn btn-primary">Apply All</button>
</div>
EDIT: When the button becomes visible click function should trigger.