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

How to assert that a get should fail #2832

Closed
tnrich opened this issue Nov 25, 2018 · 3 comments
Closed

How to assert that a get should fail #2832

tnrich opened this issue Nov 25, 2018 · 3 comments

Comments

@tnrich
Copy link
Contributor

tnrich commented Nov 25, 2018

I'm wondering how to assert that a given element should not be on the page, aka the cy.get(myEl) should fail.

Thanks!

@tnrich tnrich closed this as completed Nov 25, 2018
@tnrich tnrich changed the title assert not How to not assert that a get should fail Nov 25, 2018
@tnrich tnrich reopened this Nov 25, 2018
@tnrich tnrich changed the title How to not assert that a get should fail How to assert that a get should fail Nov 25, 2018
@StanFisher
Copy link

Try cy.get('myEl').should('not.exist').

@tnrich
Copy link
Contributor Author

tnrich commented Nov 26, 2018

@StanFisher thanks I'll try that.

@tnrich
Copy link
Contributor Author

tnrich commented Nov 26, 2018

Cheers that works!
image

@tnrich tnrich closed this as completed Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants