We are using Angular 9, webdriver-manager 12.1.7, and protractor 5.4.3. We are trying to verify in our end-to-end test that a copy button is working. When the user clicks the button, certain text is copied to the clipboard so that the user can paste it later (using Ctrl +V or Cmd+V, depending on your OS). We have
import { ExpectedConditions as EC, browser, by, element } from 'protractor';
...
async getTextFromClipboard() {
...
await browser.wait(EC.visibilityOf(element(by.css('.btn-copy'))), waitTimeout);
await element(by.css('.btn-copy')).click();
What I am not sure is how, in protractor, do we then programmatically get the text that has been copied to the clipboard?