javascript - Protractor not able to identify the angularjs button using locator by.partialButtonText or by.buttontext -
angularjs object properties
<button class="btn ng-binding" data-ng-click="v.icle(vehidform.$valid);" tabindex="0"> continue </button>
code used identify object
element(by.buttontext("continue")); or element(by.partialbuttontext("continue"));
these guesses, here things try:
use
by.xpath
locator:element(by.xpath("//button[contains(., 'continue')]"));
check
data-ng-click
value instead:$('button[data-ng-click="vm.addvehicle(vehicleaddform.$valid);"]'); $('button[data-ng-click*=addvehicle]');
wait button to present:
var elm = element(by.partialbuttontext("continue")); var ec = protractor.expectedconditions; browser.wait(ec.presenceof(elm), 5000); elm.click();
Comments
Post a Comment