handle clipboard prompt. #21085
Unanswered
jenishgandhi7
asked this question in
Component Testing
Replies: 1 comment
-
This looks like a window alert. You can stub the window alert to prevent the alert from appearing during your test. If I understand correctly this should work. it('window alert test', function () {
cy.visit('/index.html', {
onBeforeLoad(win) {
cy.stub(win, 'alert').as('windowAlert')
}
})
cy.get('#prompt').click().then(function () {
// you'll add your alert text here
expect(this.windowAlert).to.be.calledWith('Copy to clipboard: Ctrl+C, Enter')
})
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Any one have idea how to handle this clipboard prompt. i tried multiple ways but able to fix that

Beta Was this translation helpful? Give feedback.
All reactions