I'm having trouble locating buttons that contain the $ctrl part using Protractor. Here's an example of a button:
<button class="btn btn-primary ng-scope" ng-click="$ctrl.openProfileModal()" ng-if="$ctrl.admin && $ctrl.networkInfo.scenario !== 'simple_mesh'"
ng-disabled="$ctrl.stats['5G'].full && $ctrl.stats['2G'].full"><i class=""></i>Add virtual AP</button>
My first thought was to search by ng-click:
addVAPButton = element(by.css('[ng-click="$ctrl.openProfileModal()"]'))
Unfortunately, this method did not work. I have tried various combinations of commas, searching by class, ng-if, xpath, adding id, name, and other attributes to the button, but nothing helped Selenium locate it. I can find other elements on the page without $ctrl using ng-click, name, id, model, so it seems that there may be compatibility issues between $ctrl and Protractor. Are there any solutions or workarounds to target this button?
Protractor version: 5.3.0 Angular version: 1.5.11