cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

within() documentation contains an example for "temporarily escape" which does not work

Open snoozbuster opened this issue 2 years ago • 0 comments

Description

When I follow the instructions on https://docs.cypress.io/api/commands/within#Temporarily-escape, I expect them to work. They don't.

URL of Issue(s)

https://docs.cypress.io/api/commands/within#Temporarily-escape

Steps to replicate

  1. Go to the page
  2. Use the code example
  3. It doesn't work

Browser

any

Device

  • [X] PC
  • [X] Mac
  • [X] iPhone
  • [X] iPad
  • [X] Android Phone
  • [X] Android Tablet

Additional Information

The cy.root() documentation explicitly states the opposite of this section. StackOverflow suggests variations on cy.document().its('body') instead, which does work to escape the scope.

snoozbuster avatar Oct 06 '23 19:10 snoozbuster