question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CypressError: Timed out retrying: Not enough elements found. Found '2', expected '2'.

See original GitHub issue

Current behavior:

https://i.imgur.com/S8HQyMc.png

Desired behavior:

Well, obviously it should pass.

Steps to reproduce:

“baseUrl”: “https://beta.tenantreport.net/”,

describe('Signup Affiliate test', () => {
  it('Affiliate signup Test', () => {
    cy.visit('/auth/signup/referral/')

    cy.get('.toolbar-link').should($p => {
      expect($p).to.have.length(2)
      expect($p.first()).to.contain('Signup')
      expect($p.eq(1)).to.contain('Login')
    })
  })
})

Versions

Cypress 3.0.2 Electron

Work fine on chrome, but i cant use chrome because of https://github.com/cypress-io/cypress/issues/2037

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jennifer-shehanecommented, Feb 19, 2019

Hey @Elshaikh, this error is due to a typo in your assertion.

expect($lis.eq(0)).to.contains(‘Contact us’)

This should be contain not contains like

expect($lis.eq(0)).to.contain('Contact us')
0reactions
jennifer-shehanecommented, Oct 15, 2021

The original issue is no longer reproducible, so I can’t confirm if this was fixed or not.

Since this issue hasn’t had activity in a while, we’ll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we’d be happy to reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create element exists conditional w/o error "Timed out retrying"?
Timed out retrying : Expected to find element: a[data-cy="foo"], but never found it. This is expected to be conditional and not an assertion....
Read more >
CypressError: Timed out retrying - Super User
Update: Looking at the website, I see that there are multiple elements one the webpage that contain the sub-string "Software Development".
Read more >
cypress-io/cypress - Gitter
I am getting error : CypressError: Timed out retrying: Expected to find element: '#Login.Submit', but never found it. Error is because one div...
Read more >
Error Messages | Cypress Documentation
Test File Errors No tests found This message means that Cypress was unable to find tests ... CypressError: Timed out retrying: Expected to...
Read more >
Waiting in Cypress and how to avoid it - Filip Hric
Cypress will wait for the element to appear in DOM and will retry while it can. If 4 seconds are not enough, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found