On the navigation menu of my web page, there is an element labeled Admin. After inspecting it in Firebug, below is the HTML code snippet:
<button class="md-button-toggle md-button md-default-theme" ng-transclude="" ng-show="canShow()" ng-click="toggle()" aria-controls="side-menu-admin_short" flex="" layout="row" aria-expanded="false" tabindex="0" aria-hidden="false">
<div class="pull-left ng-binding ng-scope">Admin</div>
<div aria-hidden="true" class="pull-right fa fa-chevron-down md-toggle-icon ng-scope" ng-class="{'toggled' : isOpen()}" style=""></div>
<div class="md-ripple-container" style=""></div></button>
I am currently using protractor for automating tasks on the web application. However, when I tried to click the Admin element using the buttonText method, an error was thrown.
element(by.buttonText('Admin')).click();
What locator should be used to successfully click on the Admin element?