@womorg/studious-telegram
Adds ability to:
- read clipboard's content
- write to clipboard
Notice
Since it uses Chrome Devtools Protocol,
This package works with Chrome.
- Electron is not supported.
Install
npm install @womorg/studious-telegram;
Or
yarn add @womorg/studious-telegram
Usage
Copy string to clipboard
import '@womorg/studious-telegram';
cy.get('SOME SELECTOR')
.invoke('text')
.copyToClipboard();
Or
import '@womorg/studious-telegram';
cy.wrap('SOME STRING VALUE')
.copyToClipboard();
Copy from clipboard
import '@womorg/studious-telegram';
cy.copyFromClipboard().then(clipboardData => {})
Or
import '@womorg/studious-telegram';
cy.copyFromClipboard().should('eq', 'EXPECTED VALUE');
Special thanks to
Gleb Bahmutov
For
cypress-cdp package,
and for
this amazing youtube video about adding permissions to Cypress.
It helped me alot.