Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example to cy.stub() for stubbing window.prompt behavior #193

Closed
jennifer-shehane opened this issue Oct 31, 2017 · 2 comments
Closed

Comments

@jennifer-shehane
Copy link
Member

cy.visit('http://localhost:3000')
cy.window().then((win) => {
   cy.stub(win, 'prompt').returns('what i want typed into it')
})
@richdouglasevans
Copy link
Contributor

Can this issue be closed?

Also, good work Team Cypress on really digging into that first timers only drive 👍

@srinivasrk
Copy link

Does it handle prompts generated anywhere in the page ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants