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

how close 'ok' window alert #376

Closed
cristopher-rodrigues opened this Issue Jan 10, 2017 · 5 comments

Comments

3 participants
@cristopher-rodrigues
Copy link

cristopher-rodrigues commented Jan 10, 2017

image

@cristopher-rodrigues

This comment has been minimized.

Copy link

cristopher-rodrigues commented Jan 10, 2017

#33 it's the same?

@brian-mann

This comment has been minimized.

Copy link
Member

brian-mann commented Jan 10, 2017

We don't expose any API's to do this.

Internally we actually prevent confirm and alert messages from ever appearing (we auto accept them) - so you should not be seeing these.

However it can pop up if this is coming from an iframe or anything other than your app's main window/frame.

Can you post some code or explain what is calling into this? You may need to update your applications code not to show a confirm or alert box when in test mode. For instance you could check:

if (window.top.Cypress) { 
  //... don't show the confirm... 
}`
@cristopher-rodrigues

This comment has been minimized.

Copy link

cristopher-rodrigues commented Jan 10, 2017

My code is Legacy 🤕. But that:

if (window.top.Cypress) { 
  //... don't show the confirm... 
}

Work for me!

Very tnks @brian-mann!

wee need close that?

@brian-mann

This comment has been minimized.

Copy link
Member

brian-mann commented Jan 10, 2017

Nah leave it open, we need to better explain how to get around this.

@brian-mann

This comment has been minimized.

Copy link
Member

brian-mann commented Sep 6, 2017

Likely fixed by: #621

However if alert happens in an <iframe> it'll still pop up. We don't handle that situation.

@brian-mann brian-mann closed this Sep 6, 2017

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.