Skip to content

Instantly share code, notes, and snippets.

@filiphric
Created November 18, 2021 22:55
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/b4b70244a08497ac1cc5395390ba7253 to your computer and use it in GitHub Desktop.
Save filiphric/b4b70244a08497ac1cc5395390ba7253 to your computer and use it in GitHub Desktop.
<body>
  <style>/* Hey, I’m a style tag */</style>
  <script>// Hello, I’m a script</script>
</body>
cy.contains('Hey, I’m a style tag'); // will not select <style> in v9
cy.contains('Hello, I’m a script'); // will not select <script> in v9
cy.get('body style').should('contain.text', 'Hey, I’m a style tag');
cy.get('body script').should('contain.text', 'Hello, I’m a script');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment