You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for providing a reproducible example! I can recreate this. I went back to Cypress 3.4.1 to see if this still reproduces - it's still the same error there.
Seems to not be finding the labels during cypress run.
cypress open in Chrome
cypress run in Chrome
I was able to get this to work by using cy.contains('label', 'Select 2') instead of cy.get('label').contains('Select 2').
I think this may be a duplicate of this issue: #2640 and there just happens to be some variability in the runtime between cypress open and cypress run - where perhaps the label is rerendering, so is gone by the time the .contains() runs.
Current behavior:
The issue here is with trying to get a label that contains some specific text.
cy.get('label').contains('Select 2')
When running
cypress open
locally and running my e2e tests, everything passes.On the other hand, when running the same specs in CircleCI, it fails. I can reproduce this locally when running
cypress run
Desired behavior:
cypress run
should be passingTest code to reproduce
https://github.com/darthmeme/cypress-test
In this example, I'm using Chrome.
After installing dependencies:
yarn serve
yarn cy:open
(usescypress open
) and choose Chrome. Run all specs and they should all passIssue occurs here:
yarn cy:run
(usescypress run
and automatically uses Chrome), and the specs will failAny insights or help will be greatly appreciated!
Versions
Cypress:
3.8.3
(also reproduced on4.1.0
OS:
macOS Catalina
Browser:
Chrome
The text was updated successfully, but these errors were encountered: