https://i.sstatic.net/LAhi8.jpg
Seeking assistance with creating a protractor TypeScript code to click a button with _ngcontent and span class. Does anyone have any suggestions on how to achieve this? Here is the code snippet from the site:
<form _ngcontent-c34 novalidate class="ng-untouched ng-unreal ng-valid">
<atx-create-license-act-main _ngcontent-c34 _nghost-c36>
<button _ngcontent-c36 color="accent" mat-raised-button class="mat-raised-button mat-accent">
<span class="mat-button-wrapper">Add License</span>
<div class="mat-button-droped mat-droped" matdrop></div>
<div class="mat-button-focus-overlay"></div>
</button>
</atx-create-license-act-main>
</form>
<form _ngcontent-c34 novalidate class="ng-untouched ng-unreal ng-valid">
<atx-create-license-act-main _ngcontent-c34 _nghost-c36>
<button _ngcontent-c36 color="accent" mat-raised-button class="mat-raised-button mat-accent">
<span class="mat-button-wrapper">Add License</span>
<div class="mat-button-droped mat-droped" matdrop></div>
<div class="mat-button-focus-overlay"></div>
</button>
</atx-create-license-act-main>
</form>
I've attempted the code snippets below but none seem to work...
clickdone = element.all(by.cssContainingText('.mat-button-wrapper','Add License')).get(0);
clickdone = element.all(by.css('button.mat-raised-button.mat-accent')).get(1);
clickdone = element(by.cssContainingText('span.mat-button-wrapper','Add License'));
clickdone = element.all(by.cssContainingText('button.mat-raised-button.mat-accent','Add License')).get(0);
Subsequently performed...
clickdone.click();
However, none of the above code snippets seemed to work and an error message states "Failed: element not interactable". What does this mean? I am currently stuck on this issue, does anyone have any suggestions on how to resolve it?