There are multiple buttons in my code that have different classes assigned to them:
<button _ngcontent-c39="" class="btn btn-block"></button>
<button _ngcontent-c39="" class="btn btn-block btn-primary"></button>
My task is to click on all buttons with the class "btn btn-block" but avoid clicking on the button with the class "btn btn-block btn-primary". I have attempted the following:
element.all(by.css('.btn.btn-block')).click();
However, Protractor still clicks on both buttons. I also tried using the className locator, but Protractor is unable to find the element.
element.all(by.className('.btn.btn-block)).click();