cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.01k stars 3.18k forks source link

cy.get not yielding visible component. #2806

Closed cavaloni closed 5 years ago

cavaloni commented 5 years ago

Current behavior:

The command cy.get('a').contains('Engineering & Technicians') is yielding 0 elements in spite of it being visible and accessible in devtools.

screen shot 2018-11-19 at 10 26 02 am

Desired behavior:

Yield the element visible in the DOM at the time of the cypress command mentioned above.

Steps to reproduce:

It would take a while to separate out a piece of the project for this particular test. Our team is evaluating E2E frameworks and are limited in our resources to it. It may be possible though, and particularly if we are leaning strongly towards Cypress. So in the case the above may not be enough information, we may be able to do so.

I understand this is currently likely not enough information to assist, but I am not sure in this case what would be most helpful. I will provide any requested information as needed.

Versions

Cypress v3.1.0 Mac OS 10.12.6 Chrome Version 70.0.3538.102

jennifer-shehane commented 5 years ago

Hey @cavaloni, I'm actually not able to reproduce this issue.

I was wondering how the ampersand in the HTML may have been written - although I tried a few things like using & and & in the HTML content and Cypress still found it. Any insight?

jennifer-shehane commented 5 years ago

Unfortunately we have to close this issue as there is not enough information to reproduce the problem.

Please comment in this issue with a reproducible example and we will reopen the issue. 🙏