I've got an ionic app, with an ionic-list with onionic-option-button. This button becomes visible when a user swipes to the left. I want to write a protractor (Chromedriver & Android & Appium & Protractor tests) test to swipe to the left, and click the button. The swipe is no problem, I can see the button becomes visible, but the click is not registered. The ion-option-button has an ng-click event that does trigger the event. I've tried:
- Get the ion-option-button element and click it
- Tried using tap instead
- Tried to tap on the location, calculated by grabbing the ion-item (that contains the ion-option-button) and calculating where the ion-button-button is
- Using tapAndHold, wait, and release
- Used browser.driver.touchActions().tap(element)
I don't get any errors that the element is not clickable. The event is just not registered; so it looks like the ion-option-button listens to another event?
It works with Javascript:
browser.driver.executeScript('angular.element(document.getElementById("delete-button-0")).triggerHandler("click");');