Search code examples
angularprotractorangular2-testing

Protractor get iconbutton element


<td style="width: 20px;">
  <IconButton [Name]="'Signout'" [IsIconOnly]="true (click)="OnSignoutClicked()" title="Sign Out"></IconButton>
</td>

How can I locate the above element in Protractor? I want to simulate a click on the element, not to expect it.


Solution

  • You can get it by title:

    $("IconButton[title='Sign Out']").click();