vue-clipboard2 icon indicating copy to clipboard operation
vue-clipboard2 copied to clipboard

v-clipboard's copy function fails while using cypress

Open Daffodil404 opened this issue 2 years ago • 0 comments

When I was using cypress to run test cases for the purpose to copy text via v-clipboard , it always occurs error while copying here is the simple example of my problem template part: <Button id="testBtn" v-clipboard:copy="statement" v-clipboard:success="handleCopySuccess" v-clipboard:error="handleCopyError"/> Button is a component whose core is <button> , which is used to control the process via click it. cypress test part cy.get('#testBtn').click() after execute this command , there is always a fail message for us that the copy had been failed, and there was nothing in the clipboard. What should I do to copy correctly while in cypress

Daffodil404 avatar Dec 07 '22 07:12 Daffodil404