Cypress 10.3 cypress doesnt find all contains #22716
Unanswered
Dream-Work
asked this question in
Questions and Help
Replies: 1 comment
-
cy.get('a')
// find both matches
.find('Impressum')
// filter by visible
.filter(':visible')
.should('be.visible') You can also shorten the commands by using the cy.get('a')
// find visible matches
.find('Impressum:visible')
.should('be.visible') |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Website: https://www.tagesschau.de
my code: cy.get('a').contains('Impressum').should('be.visible');
wont work, because it finds the hidden match but not the match at the bottom
Cypress found 1 (one) match, but the website has 2 matches. One is hidden in the top right corner burger menu under "Mehr".
The second match is found at the bottom.
Why is this happening?
thx Sven
Beta Was this translation helpful? Give feedback.
All reactions