Skip to content

'Expect' assertion to check the element's absence doesn't work #14648

Discussion options

You must be logged in to vote

The cy.xpath already checks if the element exists, thus by the time you get the element it is too late. You might want to write your own xpath command this such option following the blog post https://glebbahmutov.com/blog/writing-custom-cypress-command/

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@sureshautomation
Comment options

@sureshautomation
Comment options

Answer selected by bahmutov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants