Our dev has a submit button like this: <button _ngcontent-c6="" class="btn btn-block btn-primary mt-lg" type="submit">Login</button> I tried using: element(by.buttonText('#submit')); but no luck with it. Note: I'm new to protractor.