Skip to content

Instantly share code, notes, and snippets.

@filiphric
Last active November 18, 2021 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filiphric/490ad18f6742f1911087f466e6db27de to your computer and use it in GitHub Desktop.
Save filiphric/490ad18f6742f1911087f466e6db27de to your computer and use it in GitHub Desktop.
cy.contains() comand
// selects any element with the text "Dashboard"
cy.contains('Dashboard')
// selects a h1 element with the text "Dashboard"
cy.contains('h1', 'Dashboard')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment