cypress: Timed out retrying after 4000ms: Expected to find element xxxxxxxxxxxxxx but never found it.

Versions

"cypress": "^7.6.0",

, Browser and version: available on cypress:open interface , Operating System: linux , CI Provider: gitlab

related to, CypressError: Timed out retrying: Expected to find element: ‘#name’, but never found it. #6811 in which never got a solution I have read all that one

Current behavior

I am having this issue, bug, problem when try to run cypress integrated with gitlab

cypress dashboard

gitlab pipeline

i have tried first with normal cy.contains by did not work

and also try with cy.get(selector)

but neither

in locally it runs perfectly but when I run in gitlab it fails

Desired behavior

that it works and pass all the test

Test code to reproduce

<h3 className="text-yellow-600 text-2xl" name="warehouseWelcomeTitle">Welcome</h3>

it("Accessing to welcome page", () => { cy.visit(/auth/${token}); cy.get('[name="warehouseWelcomeTitle"]'); });

PLEASE HELP

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (2 by maintainers)

Most upvoted comments

I got the same issue, but it happens in github workflow. Everything works fine and perfect locally, however when it runs in github, only see the blank page.

Same here. Everything is working locally but it fails in github action. Sometimes it passes sometimes not.

I got the same issue, but it happens in github workflow. Everything works fine and perfect locally, however when it runs in github, only see the blank page.

I am having the same issue. I have made sure that all the variables are present. It passes perfectly in the local device, but fails in GitHub Actions. Any solutions or references?

Any solution for this? It works perfectly locally, and the second test runs fine on Github Actions, so it’s clearly not done loading in time for the first test.

@SebasProgrammer2020 Have you tried recording the video or looking at the screenshot taken on failure? What is tthe state of the app when shown in the video/screenshot - why is this element not present?

Sometimes there’s variation in the way things fun in CI. I would suggest following on recommendations on troubleshooting why tests are fail in CI but pass locally: https://on.cypress.io/using-cypress-faq#Why-do-my-Cypress-tests-pass-locally-but-not-in-CI