Having trouble clicking on a link from a popup. Once I click on the button, the popup appears for approximately 3 seconds:
<toast-container class="ng-tns-c12-31 ng-star-inserted">
<div class="toast-top-center" id="toast-container" style="position: fixed;">
<!----><div class="toast toast-info ng-star-inserted ng-animating">
<!----><div class="toast-close-button ng-tns-c12-31 ng-star-inserted" style="">×
</div>
<!---->
<div class="ng-tns-c12-31">
<!----><span class="toast-message ng-star-inserted" style="">The section will be removed. <a class="toast-link">Cancel</a></span>
<!---->
</div>
</div>
</div>
</toast-container>
I attempted to click on "Cancel" using
element(by.partialLinkText('Cancel'))
as well as
var cancelLink = $('#toast-container a');
browser.executeScript("arguments[0].click();", cancelLink)
However, the link did not register the click. Unsure of how to validate the assertion on this popup
var toastMessageBox = $('#toast-container');
this.assertClearSelectionToastMessage = function () {
expect(toastMessageBox.$('span').getText()).toBe(toastText)
return this;
}