Reputation: 3
I'm trying to click on a button using protractor.
My HTML looks like this:
<button class="_btn--block _btn _btn--primary" ng-transclude="" sw-type="submit" swed-busy-click="" sw-priority="primary" type="submit">
<span>
Continue
</span>
</button>
I have tried using this but it didn't work:
element($('button[name="Continue"]')).click();
element(by.partialButtonText("Cont")).click()
Upvotes: 0
Views: 208
Reputation: 370
element($('button[name="Continue"]')).click(); this is not a correct css since name of the button is not available COntinue is the text
You could try
element($('button[sw-type="submit"][class^="btn--block _btn"]')).click()
Upvotes: 1